ZequanWu wrote:

> You can repro this by running ./bin/lldb-dotest -p 
> TestConstStaticIntegralMember.py --dwarf-version 5
>
> Could you take a look @ZequanWu ?

It should be fixed by the following. We just need to skip the declaration DIEs 
that are struct/class/union. This failure you see is caused by skipping a 
declaration `DW_TAG_variable`. 
```
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
index 56717bab1ecd..6330470b970e 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
@@ -87,7 +87,8 @@ bool DebugNamesDWARFIndex::ProcessEntry(
     return true;
   // Clang erroneously emits index entries for declaration DIEs in case when 
the
   // definition is in a type unit (llvm.org/pr77696). Weed those out.
-  if (die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0))
+  if (die.IsStructUnionOrClass() &&
+      die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0))
     return true;
   return callback(die);
 }
```

Can you (or anyone with commit access) commit above fix for me? I somehow 
cannot pull/push from git.

https://github.com/llvm/llvm-project/pull/92328
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to