Changeset View
Changeset View
Standalone View
Standalone View
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
Show All 21 Lines | |||||
SymbolFileDWARFDwo::SymbolFileDWARFDwo(ObjectFileSP objfile, DWARFCompileUnit* dwarf_cu) : | SymbolFileDWARFDwo::SymbolFileDWARFDwo(ObjectFileSP objfile, DWARFCompileUnit* dwarf_cu) : | ||||
SymbolFileDWARF(objfile.get()), | SymbolFileDWARF(objfile.get()), | ||||
m_obj_file_sp(objfile), | m_obj_file_sp(objfile), | ||||
m_base_dwarf_cu(dwarf_cu) | m_base_dwarf_cu(dwarf_cu) | ||||
{ | { | ||||
SetID(((lldb::user_id_t)dwarf_cu->GetOffset())<<32); | SetID(((lldb::user_id_t)dwarf_cu->GetOffset())<<32); | ||||
} | } | ||||
const lldb_private::DWARFDataExtractor& | void | ||||
SymbolFileDWARFDwo::GetCachedSectionData(uint32_t got_flag, | SymbolFileDWARFDwo::LoadSectionData (lldb::SectionType sect_type, DWARFDataExtractor& data) | ||||
lldb::SectionType sect_type, | |||||
lldb_private::DWARFDataExtractor &data) | |||||
{ | { | ||||
if (!m_flags.IsClear (got_flag)) | |||||
return data; | |||||
const SectionList* section_list = m_obj_file->GetSectionList(false /* update_module_section_list */); | const SectionList* section_list = m_obj_file->GetSectionList(false /* update_module_section_list */); | ||||
if (section_list) | if (section_list) | ||||
{ | { | ||||
SectionSP section_sp (section_list->FindSectionByType(sect_type, true)); | SectionSP section_sp (section_list->FindSectionByType(sect_type, true)); | ||||
if (section_sp) | if (section_sp) | ||||
{ | { | ||||
// See if we memory mapped the DWARF segment? | // See if we memory mapped the DWARF segment? | ||||
if (m_dwarf_data.GetByteSize()) | if (m_dwarf_data.GetByteSize()) | ||||
{ | { | ||||
data.SetData(m_dwarf_data, section_sp->GetOffset(), section_sp->GetFileSize()); | data.SetData(m_dwarf_data, section_sp->GetOffset(), section_sp->GetFileSize()); | ||||
m_flags.Set (got_flag); | return; | ||||
return data; | |||||
} | } | ||||
if (m_obj_file->ReadSectionData(section_sp.get(), data) != 0) | if (m_obj_file->ReadSectionData(section_sp.get(), data) != 0) | ||||
{ | return; | ||||
m_flags.Set (got_flag); | |||||
return data; | |||||
} | |||||
data.Clear(); | data.Clear(); | ||||
} | } | ||||
} | } | ||||
return SymbolFileDWARF::GetCachedSectionData(got_flag, sect_type, data); | |||||
SymbolFileDWARF::LoadSectionData(sect_type, data); | |||||
} | } | ||||
lldb::CompUnitSP | lldb::CompUnitSP | ||||
SymbolFileDWARFDwo::ParseCompileUnit(DWARFCompileUnit* dwarf_cu, uint32_t cu_idx) | SymbolFileDWARFDwo::ParseCompileUnit(DWARFCompileUnit* dwarf_cu, uint32_t cu_idx) | ||||
{ | { | ||||
assert(GetCompileUnit() == dwarf_cu && "SymbolFileDWARFDwo::ParseCompileUnit called with incompatible compile unit"); | assert(GetCompileUnit() == dwarf_cu && "SymbolFileDWARFDwo::ParseCompileUnit called with incompatible compile unit"); | ||||
return GetBaseSymbolFile()->ParseCompileUnit(m_base_dwarf_cu, UINT32_MAX); | return GetBaseSymbolFile()->ParseCompileUnit(m_base_dwarf_cu, UINT32_MAX); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |