[Lldb-commits] [lldb] Improve type lookup using .debug_names parent chain (PR #108907)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 27 01:34:38 PDT 2024


================
@@ -301,7 +301,8 @@ using Entry = llvm::DWARFDebugNames::Entry;
 /// If any parent does not have an `IDX_parent`, or the Entry data is corrupted,
 /// nullopt is returned.
 std::optional<llvm::SmallVector<Entry, 4>>
-getParentChain(Entry entry, uint32_t max_parents) {
+getParentChain(Entry entry,
+               uint32_t max_parents = std::numeric_limits<uint32_t>::max()) {
   llvm::SmallVector<Entry, 4> parent_entries;
----------------
labath wrote:

The first one. Basically, if you try something like `clang++ -o - -c -g -gpubnames -fdebug-types-section -x c++ - <<<"struct A { struct B {}; }; A a; A::B b;"`, you'll see that the entry for `B` has no DW_IDX_parent attribute (I think it could have it, but we'd have to figure out what exactly it should refer to).

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


More information about the lldb-commits mailing list