[Lldb-commits] [lldb] [lldb][DWARF] Do not complete type from declaration die. (PR #91799)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri May 10 13:04:16 PDT 2024


https://github.com/clayborg commented:

Let me verify this works. I would also like this to fix:
```
bool DebugNamesDWARFIndex::ProcessEntry(
    const DebugNames::Entry &entry,
    llvm::function_ref<bool(DWARFDIE die)> callback) {
  std::optional<DIERef> ref = ToDIERef(entry);
  if (!ref)
    return true;
  SymbolFileDWARF &dwarf = *llvm::cast<SymbolFileDWARF>(
      m_module.GetSymbolFile()->GetBackingSymbolFile());
  DWARFDIE die = dwarf.GetDIE(*ref);
  if (!die)
    return true;
  // Watch out for forward declarations that appear in the .debug_names tables
  // only due to being there for a DW_IDX_parent.
  if (die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0))
    return true;
  return callback(die);
}
```
This adds:
```
  // Watch out for forward declarations that appear in the .debug_names tables
  // only due to being there for a DW_IDX_parent.
  if (die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0))
    return true;
```
To the above function to ensure we don't waste any time trying to parse any DIE information for forward declaration when using .debug_names. This will cause a TON of churn on our DWARF parser and cause us to pull in and parse way too much.

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


More information about the lldb-commits mailing list