diff options
Diffstat (limited to 'lldb/source/Plugins')
4 files changed, 7 insertions, 23 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp index 5b95912909e..320500fe608 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -645,25 +645,7 @@ dw_offset_t DWARFDebugInfoEntry::GetAttributeValue( } } } - - // If we're a unit DIE, also check the attributes of the dwo unit (if any). - if (GetParent()) - return 0; - SymbolFileDWARFDwo *dwo_symbol_file = cu->GetDwoSymbolFile(); - if (!dwo_symbol_file) - return 0; - - DWARFCompileUnit *dwo_cu = dwo_symbol_file->GetCompileUnit(); - if (!dwo_cu) - return 0; - - DWARFBaseDIE dwo_cu_die = dwo_cu->GetUnitDIEOnly(); - if (!dwo_cu_die.IsValid()) - return 0; - - return dwo_cu_die.GetDIE()->GetAttributeValue( - dwo_cu, attr, form_value, end_attr_offset_ptr, - check_specification_or_abstract_origin); + return 0; } // GetAttributeValueAsString diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp index dcb38da3c43..142de7fb0eb 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp @@ -790,7 +790,8 @@ void DWARFUnit::ComputeAbsolutePath() { m_file_spec->MakeAbsolute(GetCompilationDirectory()); } -SymbolFileDWARFDwo *DWARFUnit::GetDwoSymbolFile() const { +SymbolFileDWARFDwo *DWARFUnit::GetDwoSymbolFile() { + ExtractUnitDIEIfNeeded(); return m_dwo_symbol_file.get(); } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h index 6bee4ab8be8..217f9bb89ac 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h @@ -201,7 +201,7 @@ public: lldb_private::FileSpec GetFile(size_t file_idx); lldb_private::FileSpec::Style GetPathStyle(); - SymbolFileDWARFDwo *GetDwoSymbolFile() const; + SymbolFileDWARFDwo *GetDwoSymbolFile(); die_iterator_range dies() { ExtractDIEsIfNeeded(); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 0792260e36f..533af5f4e83 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -693,7 +693,8 @@ lldb::CompUnitSP SymbolFileDWARF::ParseCompileUnit(DWARFCompileUnit &dwarf_cu) { } else { ModuleSP module_sp(m_objfile_sp->GetModule()); if (module_sp) { - const DWARFDIE cu_die = dwarf_cu.DIE(); + const DWARFBaseDIE cu_die = + dwarf_cu.GetNonSkeletonUnit().GetUnitDIEOnly(); if (cu_die) { FileSpec cu_file_spec(cu_die.GetName(), dwarf_cu.GetPathStyle()); if (cu_file_spec) { @@ -711,7 +712,7 @@ lldb::CompUnitSP SymbolFileDWARF::ParseCompileUnit(DWARFCompileUnit &dwarf_cu) { LanguageType cu_language = DWARFUnit::LanguageTypeFromDWARF( cu_die.GetAttributeValueAsUnsigned(DW_AT_language, 0)); - bool is_optimized = dwarf_cu.GetIsOptimized(); + bool is_optimized = dwarf_cu.GetNonSkeletonUnit().GetIsOptimized(); BuildCuTranslationTable(); cu_sp = std::make_shared<CompileUnit>( module_sp, &dwarf_cu, cu_file_spec, |

