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

      1 ---
      2 title: 'SAOC LLDB D integration: 13th Weekly Update'
      3 date: '2021-12-16T23:34:00+01:00'
      4 tags: ['saoc', 'saoc2021', 'dlang', 'llvm', 'lldb', 'debug', 'debugging', 'dwarf']
      5 description: "This post describes what I've done on the 13th week of the
      6 Symmetry Autumn of Code 2021, including some bug fixes and trivial patches."
      7 ---
      9 Hi D community!
     11 I'm here again, to describe what I've done during the thirteenth week of
     12 Symmetry Autumn of Code. This week as a bit atypical as I got infected with
     13 COVID-19 and this made me feel exhausted both physically and mentally.
     15 ## Working approach to fetch basic types
     17 After digging a bit about the problem I found out there is no problem
     18 specifically in Release builds, and a simple function called `Verify` is there
     19 to double check if the type is correct for Debug builds. After fixing that
     20 function, the LLDB can now dump some simple output about global TLS and non-TLS
     21 variables:
     23 ```
     24 (lldb) ta v
     25 Global variables for app.d in app:
     26 = <No TLS data currently exists for this thread.>
     28 app.ptr = <could not resolve type>
     29 app.foobar =
     30 ```
     32 For now it only recognizes boolean types, but it can't show up the value since
     33 LLDB doesn't know a way to dump it correctly.
     35 You can try this version yourself using
     36 [this](
     37 branch.
     39 ## Decoupling and trivial patches
     41 I pushed a patch to decouple DWARF to LLDB encoding logic from Clang DWARF AST
     42 Parser, along with a trivial fix about duplicate map assignment:
     44 -
     45 -
     47 ## What is next?
     49 I already started working on some helpers to fetch the LLDB Format, Encoding
     50 and BasicType, along with other information about a type to properly display
     51 them. I'm not sure how Milestone 4 is going to work, as I underestimated
     52 the support for custom expessions.
     54 You can also read this on the D programming language forum,
     55 [here](,
     56 and discuss there!
     58 Read about the [previous week](../d-saoc-2021-12/) and the [next
     59 week](../d-saoc-2021-14/).