My personal website source code
Log | Files | Refs | Submodules | README | LICENSE (4076B)

      1 ---
      2 title: 'SAOC LLDB D integration: 7th Weekly Update'
      3 date: '2021-11-04T01:39:00+01:00'
      4 tags: ['saoc', 'saoc2021', 'dlang', 'llvm', 'lldb', 'debug', 'debugging', 'dwarf']
      5 description: "This post describes what I've done on the 7th week of the
      6 Symmetry Autumn of Code 2021, including updates on the LLVM patches, various
      7 fixes and refactors in the compiler and some more issues found."
      8 ---
     10 Hi D community!
     12 I'm here again, to describe what I've done during the seventh week of Symmetry
     13 Autumn of Code.
     15 ## LLVM/LLDB upstream status update
     17 Some trivial changes about LLDB plugins got merged and a fix got raised after
     18 my investigation on .
     20 I have some fresh news about the demangler being upstreamed. It appears that
     21 approval from official foundation members is not going forward, as expected. At
     22 this point, most of the code from libiberty got changed, at least on the first
     23 patches. This is unfortunate, but I'm going to do my best to push this forward.
     24 I have some experience with D demangling, so making a clean room implementation
     25 is not big of a deal, it is just time consuming.
     27 Some of my considerations on this is to try to contact every single contributor
     28 in d-demangler.c file, which is roughly 5 contributors, but I still need to
     29 coordinate this with them and my mentor for the best option.
     31 About the D plugin for LLDB, I also got news. They seems to accept new language
     32 plugins as long as there is enough maintainers. If someone wants to volunteer
     33 to co-maintain it, I would appreciate.
     35 ## DWARF Abbreviation refactor
     37 I pushed the refactor I was working on in the past week. You can find more
     38 about it here: . I'm probably going to
     39 freeze this until I fix the other issues that have much more priority and work
     40 on this when DWARF behaviour is more consistent.
     42 During the refactor I accidentally discovered a double free after rebasing with
     43 andrea's change and reported some ASAN issues I found suitable to report:
     45 -
     46 -
     47 -
     49 ## Fixed issues
     51 ### Delegates are now distinguishable
     53 Previously, delegates was being generated with `_Delegate` naming and now they
     54 use the qualified name of the type, being something similar to `void delegate()
     55 @nogc`. You can find the patch and the associated issue here:
     57 -
     58 -
     60 ### wchar_t reports incorrect DECL attributes
     62 When a `wchar` is used, the typedef generated by the compiler reports a dummy
     63 filename and line declarations. I fixed this on:
     64 -
     65 -
     67 ### dchar encoding is missing
     69 When using `dchar` type, encoding is not correctly reported as UTF and
     70 debuggers like LLDB doesn't show it properly. I fixed it on:
     71 -
     72 -
     74 During these various fixes, I ended up making the following trivial minor
     75 patches:
     77 -
     78 -
     79 -
     81 ## Other reported issues
     83 I also reported the following issues that I'll consider fixing next week:
     85 -
     86 -
     88 ## What is next?
     90 I didn't have much time this week to make all the tasks I wanted to do, which
     91 was primarily fixing the compiler related issues. I'm currently in a conference
     92 and my productive is limited. I hope next week I can do a bit more stuff and
     93 hopefully fix most of the issues I have in mind to homogenize the DWARF
     94 generation.
     96 You can also read this on the D programming language forum,
     97 [here]([email protected]),
     98 and discuss there.
    100 Read about the [previous week](../d-saoc-2021-06/) and the [next
    101 week](../d-saoc-2021-08/).