Author: Luís Ferreira <email@example.com>
Date: Thu, 4 Nov 2021 02:42:25 +0000
posts: SAOC LLDB D integration: 7th Weekly Update
Signed-off-by: Luís Ferreira <firstname.lastname@example.org>
2 files changed, 98 insertions(+), 1 deletion(-)
diff --git a/content/posts/d-saoc-2021-06.md b/content/posts/d-saoc-2021-06.md
@@ -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
-Read about the [previous week](../d-saoc-2021-05/).
+Read about the [previous week](../d-saoc-2021-05/) and the [next
diff --git a/content/posts/d-saoc-2021-07.md b/content/posts/d-saoc-2021-07.md
@@ -0,0 +1,96 @@
+title: 'SAOC LLDB D integration: 7th Weekly Update'
+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 https://bugs.llvm.org/show_bug.cgi?id=45856 .
+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: https://github.com/dlang/dmd/pull/13237 . 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
+## 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
+Read about the [previous week](../d-saoc-2021-06/).