git

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

d-saoc-2021-07.md (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 ---
      9 
     10 Hi D community!
     11 
     12 I'm here again, to describe what I've done during the seventh week of Symmetry
     13 Autumn of Code.
     14 
     15 ## LLVM/LLDB upstream status update
     16 
     17 Some trivial changes about LLDB plugins got merged and a fix got raised after
     18 my investigation on https://bugs.llvm.org/show_bug.cgi?id=45856 .
     19 
     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.
     26 
     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.
     30 
     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.
     34 
     35 ## DWARF Abbreviation refactor
     36 
     37 I pushed the refactor I was working on in the past week. You can find more
     38 about it here: https://github.com/dlang/dmd/pull/13237 . 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.
     41 
     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:
     44 
     45 - https://issues.dlang.org/show_bug.cgi?id=22450
     46 - https://issues.dlang.org/show_bug.cgi?id=22451
     47 - https://issues.dlang.org/show_bug.cgi?id=22452
     48 
     49 ## Fixed issues
     50 
     51 ### Delegates are now distinguishable
     52 
     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:
     56 
     57 - https://issues.dlang.org/show_bug.cgi?id=22459
     58 - https://github.com/dlang/dmd/pull/13241
     59 
     60 ### wchar_t reports incorrect DECL attributes
     61 
     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 - https://github.com/dlang/dmd/pull/13247
     65 - https://issues.dlang.org/show_bug.cgi?id=22467
     66 
     67 ### dchar encoding is missing
     68 
     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 - https://issues.dlang.org/show_bug.cgi?id=22468
     72 - https://github.com/dlang/dmd/pull/13254
     73 
     74 During these various fixes, I ended up making the following trivial minor
     75 patches:
     76 
     77 - https://github.com/dlang/dmd/pull/13240
     78 - https://github.com/dlang/dmd/pull/13239
     79 - https://github.com/dlang/dmd/pull/13246
     80 
     81 ## Other reported issues
     82 
     83 I also reported the following issues that I'll consider fixing next week:
     84 
     85 - https://issues.dlang.org/show_bug.cgi?id=22469
     86 - https://issues.dlang.org/show_bug.cgi?id=22471
     87 
     88 ## What is next?
     89 
     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.
     95 
     96 You can also read this on the D programming language forum,
     97 [here](https://forum.dlang.org/thread/[email protected]),
     98 and discuss there.
     99 
    100 Read about the [previous week](../d-saoc-2021-06/) and the [next
    101 week](../d-saoc-2021-08/).