git

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

d-saoc-2021-12.md (3114B)


      1 ---
      2 title: 'SAOC LLDB D integration: 12th Weekly Update'
      3 date: '2021-12-09T15:25:00+01:00'
      4 tags: ['saoc', 'saoc2021', 'dlang', 'llvm', 'lldb', 'debug', 'debugging', 'dwarf']
      5 description: "This post describes what I've done on the 12th week of the
      6 Symmetry Autumn of Code 2021, including follow up updates on the LLVM patches
      7 continuation of decoupling of clang-specific code on LLDB interfaces and
      8 finishing implementation of D basic types."
      9 ---
     10 
     11 Hi D community!
     12 
     13 I'm here again, to describe what I've done during the twelfth week of Symmetry
     14 Autumn of Code.
     15 
     16 ## LLVM upstream follow up update
     17 
     18 Two more patches in the D demangling patch train got merged!
     19 
     20 - https://reviews.llvm.org/D114308
     21 - https://reviews.llvm.org/D114309
     22 
     23 After getting my testsuite working reasonably well, I self merged those two
     24 accepted patches. I've contacted some LLVM members to figure out why buildbots
     25 were not reproducing my errors, and it seems some tests are not running on
     26 their testsuite, hence the error.
     27 
     28 I also amended some existing patches, accordingly with reviews.
     29 
     30 ## Finishing implementation of basic types and continuing decoupling Clang-specific code
     31 
     32 I finished the implementation I had in mind to support at least one basic type
     33 (I choose boolean, just for testing it, being straightforward to implement the
     34 rest) with a Type wrapper called `DType`. Although, I'm not getting any output
     35 from the DWARF parser and `ParseTypeFromDWARF` function is not being called at
     36 all. I checked other language implementations, like Golang, but they are very
     37 outdated. I assume there is yet another entangled clang-specific stuff I still
     38 need to figure out or something I'm missing.
     39 
     40 You can see the changes here:
     41 https://github.com/devtty63/llvm-project/tree/lldb-d/implement-typesystem-d
     42 
     43 I made one more patch to move forward with clang-specific decoupling, in order
     44 to be able to support custom languages:
     45 
     46 - https://reviews.llvm.org/D115201
     47 
     48 I have more changes uncommitted that needs some tuning, including a DWARF to
     49 LLDB encoding helper, needed by language DWARF AST Parsers.
     50 
     51 ## Simple Continuous Integration for LLDB-d
     52 
     53 I've been tinkering with some custom continuous integration for my llvm tree to
     54 provide automated builds to the community to test. So, I moved the repository
     55 to a new organization just to be able to have organization-wide self-hosted
     56 machines on Github actions. I already have a successful action working but it
     57 takes around 4h to complete, not including the actual testsuite, so I still
     58 need to revaluate the workflow and probably choose self-hosted machines for
     59 fast builds. Here are the workflows, if you are interested:
     60 https://github.com/devtty63/llvm-project/actions .
     61 
     62 ## What is next?
     63 
     64 I will try to figure out why my current approach is not working as expected and
     65 if I get a successful output, I will start working on the DWARF dump system.
     66 
     67 You can also read this on the D programming language forum,
     68 [here](https://forum.dlang.org/thread/[email protected]),
     69 and discuss there!
     70 
     71 Read about the [previous week](../d-saoc-2021-11/) and the [next
     72 week](../d-saoc-2021-13/).