Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp @@ -186,8 +186,11 @@ if (m_cu) { - assert ((id&0xffffffff00000000ull) == 0 || m_cu->GetOffset() == 0); - id |= ((lldb::user_id_t)m_cu->GetOffset()) << 32; + lldb::user_id_t cu_id = ((lldb::user_id_t)m_cu->GetID())<<32; + assert ((id&0xffffffff00000000ull) == 0 || + (cu_id&0xffffffff00000000ll) == 0 || + (id&0xffffffff00000000ull) == (cu_id&0xffffffff00000000ll)); + id |= cu_id; } return id; } Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h @@ -433,7 +433,7 @@ bool include_inlines, lldb_private::SymbolContextList& sc_list); - lldb::TypeSP + virtual lldb::TypeSP FindDefinitionTypeForDWARFDeclContext (const DWARFDeclContext &die_decl_ctx); lldb::TypeSP Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h @@ -51,6 +51,12 @@ ClangTypeToDIE& GetForwardDeclClangTypeToDie() override; + lldb::TypeSP + FindDefinitionTypeForDWARFDeclContext (const DWARFDeclContext &die_decl_ctx) override; + + SymbolFileDWARF* + GetBaseSymbolFile(); + lldb::ObjectFileSP m_obj_file_sp; DWARFCompileUnit* m_base_dwarf_cu; }; Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp @@ -23,6 +23,7 @@ m_obj_file_sp(objfile), m_base_dwarf_cu(dwarf_cu) { + SetID(((lldb::user_id_t)dwarf_cu->GetOffset())<<32); } const lldb_private::DWARFDataExtractor& @@ -63,7 +64,7 @@ SymbolFileDWARFDwo::ParseCompileUnit(DWARFCompileUnit* dwarf_cu, uint32_t cu_idx) { assert(GetCompileUnit() == dwarf_cu && "SymbolFileDWARFDwo::ParseCompileUnit called with incompatible compile unit"); - return m_base_dwarf_cu->GetSymbolFileDWARF()->ParseCompileUnit(m_base_dwarf_cu, UINT32_MAX); + return GetBaseSymbolFile()->ParseCompileUnit(m_base_dwarf_cu, UINT32_MAX); } DWARFCompileUnit* @@ -85,23 +86,35 @@ SymbolFileDWARF::DIEToTypePtr& SymbolFileDWARFDwo::GetDIEToType() { - return m_base_dwarf_cu->GetSymbolFileDWARF()->GetDIEToType(); + return GetBaseSymbolFile()->GetDIEToType(); } SymbolFileDWARF::DIEToVariableSP& SymbolFileDWARFDwo::GetDIEToVariable() { - return m_base_dwarf_cu->GetSymbolFileDWARF()->GetDIEToVariable(); + return GetBaseSymbolFile()->GetDIEToVariable(); } SymbolFileDWARF::DIEToClangType& SymbolFileDWARFDwo::GetForwardDeclDieToClangType() { - return m_base_dwarf_cu->GetSymbolFileDWARF()->GetForwardDeclDieToClangType(); + return GetBaseSymbolFile()->GetForwardDeclDieToClangType(); } SymbolFileDWARF::ClangTypeToDIE& SymbolFileDWARFDwo::GetForwardDeclClangTypeToDie() { - return m_base_dwarf_cu->GetSymbolFileDWARF()->GetForwardDeclClangTypeToDie(); + return GetBaseSymbolFile()->GetForwardDeclClangTypeToDie(); +} + +lldb::TypeSP +SymbolFileDWARFDwo::FindDefinitionTypeForDWARFDeclContext (const DWARFDeclContext &die_decl_ctx) +{ + return GetBaseSymbolFile()->FindDefinitionTypeForDWARFDeclContext(die_decl_ctx); +} + +SymbolFileDWARF* +SymbolFileDWARFDwo::GetBaseSymbolFile() +{ + return m_base_dwarf_cu->GetSymbolFileDWARF(); }