summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
index 42e96af84a96..493d1b4a2702 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
@@ -45,15 +45,16 @@ bool NameToDIE::Find(const RegularExpression &regex,
}
void NameToDIE::FindAllEntriesForUnit(
- const DWARFUnit &unit,
- llvm::function_ref<bool(DIERef ref)> callback) const {
+ DWARFUnit &s_unit, llvm::function_ref<bool(DIERef ref)> callback) const {
+ lldbassert(!s_unit.GetSymbolFileDWARF().GetDwoNum());
+ const DWARFUnit &ns_unit = s_unit.GetNonSkeletonUnit();
const uint32_t size = m_map.GetSize();
for (uint32_t i = 0; i < size; ++i) {
const DIERef &die_ref = m_map.GetValueAtIndexUnchecked(i);
- if (unit.GetSymbolFileDWARF().GetDwoNum() == die_ref.dwo_num() &&
- unit.GetDebugSection() == die_ref.section() &&
- unit.GetOffset() <= die_ref.die_offset() &&
- die_ref.die_offset() < unit.GetNextUnitOffset()) {
+ if (ns_unit.GetSymbolFileDWARF().GetDwoNum() == die_ref.dwo_num() &&
+ ns_unit.GetDebugSection() == die_ref.section() &&
+ ns_unit.GetOffset() <= die_ref.die_offset() &&
+ die_ref.die_offset() < ns_unit.GetNextUnitOffset()) {
if (!callback(die_ref))
return;
}