d-saoc-2021-03.md (2693B)
1 --- 2 title: 'SAOC LLDB D integration: 3rd Weekly Update' 3 date: '2021-10-06T21:07:00+01:00' 4 tags: ['saoc', 'saoc2021', 'dlang', 'llvm', 'lldb', 'debug', 'debugging', 'dwarf'] 5 description: "This post describes what I've done on the 3rd week of the 6 Symmetry Autumn of Code 2021, including restructuring the patch history by 7 splitting it up according to what LLVM team requested, bug fixes on the 8 libiberty demangler and a small fix on DMD backend for fully qualified names on 9 DWARF info" 10 --- 11 12 Hi D community! 13 14 I'm here again, to describe what I've done during the third week of Symmetry 15 Autumn of Code. 16 17 ## Restructuring the patch history 18 19 According to LLVM team, the [patch](https://reviews.llvm.org/D110576) I 20 previously sent needs to be split into smaller ones and that is a bit of a 21 challenge. Why you may ask? Because looking at the [ABI 22 specification](https://dlang.org/spec/abi.html) a lot of mangling nodes are 23 dependent of each other and splitting 3000 lines of code into small, stackable 24 and independent patches needs some planning. I tried several layouts and 25 [this](../../public/assets/posts/d-saoc-2021-03/split-todo.md) one seems 26 to work out the best, so I'm sticking with it. 27 28 Unfortunately, this week was kinda unproductive as I mostly spent this week 29 entirely restructuring the patch. 30 31 Because I'll only push the patches when they are done, for now, my work is on 32 [this](https://github.com/ljmf00/llvm-project/commits/add-d-demangler-splitted) 33 branch, although bare in mind that this will constantly change, and to fetch 34 new changes you need to hard reset them when pulling. 35 36 ## Fixing a bug on libiberty D demangler 37 38 During the restructure, I found out that anonymous symbols were not correctly 39 handled and skipped, according to the specification, so I reported a 40 [bug](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102618) and sent a 41 [patch](https://gcc.gnu.org/pipermail/gcc-patches/2021-October/580999.html) to 42 fix the issue. 43 44 ## Add fully qualified name on array DWARF tags 45 46 This is part of the milestone 2, but since I had 47 [this](https://github.com/dlang/dmd/pull/13120) patch archived for a long time 48 I decided to push it on the weekend. 49 50 ## What's next? 51 52 Next week I hopefully finish the patch split and finally push this to the LLVM 53 review platform. I'm also going to prepare some work for the milestone 2 that 54 includes analyzing some DWARF info that is currently being generated by 55 DMD/LDC/GDC compilers. 56 57 You can also read this on the D programming language forum, 58 [here](https://forum.dlang.org/thread/mailman.649.1633575050.21945.digitalmars-d@puremagic.com), 59 and discuss there. 60 61 Read about the [previous week](../d-saoc-2021-02/) and [next 62 week](../d-saoc-2021-04/).