My personal website source code
Log | Files | Refs | Submodules | README | LICENSE

commit 6cb2eecdb1242424830f247da2c07c33942ed99a
parent 90c1fdccbac64b53221d4a6dbc9b476651c58f82
Author: Luís Ferreira <>
Date:   Thu,  4 Nov 2021 02:42:25 +0000

posts: SAOC LLDB D integration: 7th Weekly Update

Signed-off-by: Luís Ferreira <>

Mcontent/posts/ | 3++-
Acontent/posts/ | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+), 1 deletion(-)

diff --git a/content/posts/ b/content/posts/ @@ -137,4 +137,5 @@ backend to handle DWARF abbreviations correctly. The objective of the second milestone is finished but I'm going to try to study more features to improve pretty printing. -Read about the [previous week](../d-saoc-2021-05/). +Read about the [previous week](../d-saoc-2021-05/) and the [next +week](../d-saoc-2021-07/). diff --git a/content/posts/ b/content/posts/ @@ -0,0 +1,96 @@ +--- +title: 'SAOC LLDB D integration: 7th Weekly Update' +date: '2021-11-04T01:39:00+01:00' +tags: ['saoc', 'saoc2021', 'dlang', 'llvm', 'lldb', 'debug', 'debugging', 'dwarf'] +description: "This post describes what I've done on the 7th week of the +Symmetry Autumn of Code 2021, including updates on the LLVM patches, various +fixes and refactors in the compiler and some more issues found." +--- + +Hi D community! + +I'm here again, to describe what I've done during the seventh week of Symmetry +Autumn of Code. + +## LLVM/LLDB upstream status update + +Some trivial changes about LLDB plugins got merged and a fix got raised after +my investigation on . + +I have some fresh news about the demangler being upstreamed. It appears that +approval from official foundation members is not going forward, as expected. At +this point, most of the code from libiberty got changed, at least on the first +patches. This is unfortunate, but I'm going to do my best to push this forward. +I have some experience with D demangling, so making a clean room implementation +is not big of a deal, it is just time consuming. + +Some of my considerations on this is to try to contact every single contributor +in d-demangler.c file, which is roughly 5 contributors, but I still need to +coordinate this with them and my mentor for the best option. + +About the D plugin for LLDB, I also got news. They seems to accept new language +plugins as long as there is enough maintainers. If someone wants to volunteer +to co-maintain it, I would appreciate. + +## DWARF Abbreviation refactor + +I pushed the refactor I was working on in the past week. You can find more +about it here: . I'm probably going to +freeze this until I fix the other issues that have much more priority and work +on this when DWARF behaviour is more consistent. + +During the refactor I accidentally discovered a double free after rebasing with +andrea's change and reported some ASAN issues I found suitable to report: + +- +- +- + +## Fixed issues + +### Delegates are now distinguishable + +Previously, delegates was being generated with `_Delegate` naming and now they +use the qualified name of the type, being something similar to `void delegate() +@nogc`. You can find the patch and the associated issue here: + +- +- + +### wchar_t reports incorrect DECL attributes + +When a `wchar` is used, the typedef generated by the compiler reports a dummy +filename and line declarations. I fixed this on: +- +- + +### dchar encoding is missing + +When using `dchar` type, encoding is not correctly reported as UTF and +debuggers like LLDB doesn't show it properly. I fixed it on: +- +- + +During these various fixes, I ended up making the following trivial minor +patches: + +- +- +- + +## Other reported issues + +I also reported the following issues that I'll consider fixing next week: + +- +- + +## What is next? + +I didn't have much time this week to make all the tasks I wanted to do, which +was primarily fixing the compiler related issues. I'm currently in a conference +and my productive is limited. I hope next week I can do a bit more stuff and +hopefully fix most of the issues I have in mind to homogenize the DWARF +generation. + +Read about the [previous week](../d-saoc-2021-06/).