summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
index de4cfc2c738..99fd3340a3e 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
@@ -61,13 +61,13 @@ SymbolFileDWARFDwo::ParseCompileUnit(DWARFCompileUnit *dwarf_cu,
}
DWARFCompileUnit *SymbolFileDWARFDwo::GetCompileUnit() {
- // Clang modules are found via a skeleton CU, but are not DWO
- // objects. Clang modules have a .debug_info section instead of the
- // *_dwo variant. Note that this is hardcoding the ELF section name
- // based on the assumption that Mach-O does not use DWO objects.
+ // A clang module is found via a skeleton CU, but is not a proper DWO.
+ // Clang modules have a .debug_info section instead of the *_dwo variant.
if (auto *section_list = m_obj_file->GetSectionList(false))
- if (section_list->FindSectionByName(ConstString(".debug_info")))
- return nullptr;
+ if (auto section_sp =
+ section_list->FindSectionByType(eSectionTypeDWARFDebugInfo, true))
+ if (!section_sp->GetName().GetStringRef().endswith("dwo"))
+ return nullptr;
// Only dwo files with 1 compile unit is supported
if (GetNumCompileUnits() == 1)
OpenPOWER on IntegriCloud