forked from OSchip/llvm-project
				
			Fix several issues arount dwo symbol file handling
Differential revision: http://reviews.llvm.org/D12804 llvm-svn: 247671
This commit is contained in:
		
							parent
							
								
									7beb737b46
								
							
						
					
					
						commit
						d536a6d9dc
					
				| 
						 | 
				
			
			@ -186,8 +186,11 @@ DWARFDIE::GetID () const
 | 
			
		|||
 | 
			
		||||
        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;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -433,7 +433,7 @@ protected:
 | 
			
		|||
                   bool include_inlines,
 | 
			
		||||
                   lldb_private::SymbolContextList& sc_list);
 | 
			
		||||
 | 
			
		||||
    lldb::TypeSP
 | 
			
		||||
    virtual lldb::TypeSP
 | 
			
		||||
    FindDefinitionTypeForDWARFDeclContext (const DWARFDeclContext &die_decl_ctx);
 | 
			
		||||
 | 
			
		||||
    lldb::TypeSP
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,6 +23,7 @@ SymbolFileDWARFDwo::SymbolFileDWARFDwo(ObjectFileSP objfile, DWARFCompileUnit* d
 | 
			
		|||
    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 @@ lldb::CompUnitSP
 | 
			
		|||
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 @@ SymbolFileDWARFDwo::GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit)
 | 
			
		|||
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();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,6 +51,12 @@ protected:
 | 
			
		|||
    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;
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue