[Lldb-commits] [lldb] [lldb] Recurse through DW_AT_signature when looking for attributes (PR #107241)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 5 04:41:21 PDT 2024


================
@@ -377,11 +378,6 @@ static void GetDeclContextImpl(DWARFDIE die,
       die = spec;
       continue;
     }
-    // To find the name of a type in a type unit, we must follow the signature.
-    if (DWARFDIE spec = die.GetReferencedDIE(DW_AT_signature)) {
----------------
Michael137 wrote:

Ahh right, makes sense.

So for `DW_AT_specification`s, the referring DIE doesn't have the parent chain structure. So we *must* follow the DIE it referred to in order to reconstruct the context. With `DW_AT_signature` the context structure is maintained, so this now becomes redundant.

https://github.com/llvm/llvm-project/pull/107241


More information about the lldb-commits mailing list