LLDB mainline
|
#include <DWARFDebugInfo.h>
Public Types | |
enum | { eDumpFlag_Verbose = (1 << 0) , eDumpFlag_ShowForm = (1 << 1) , eDumpFlag_ShowAncestors } |
typedef dw_offset_t(* | Callback) (SymbolFileDWARF *dwarf2Data, DWARFUnit *cu, DWARFDebugInfoEntry *die, const dw_offset_t next_offset, const uint32_t depth, void *userData) |
Public Member Functions | |
DWARFDebugInfo (SymbolFileDWARF &dwarf, lldb_private::DWARFContext &context) | |
size_t | GetNumUnits () |
DWARFUnit * | GetUnitAtIndex (size_t idx) |
DWARFUnit * | GetUnitAtOffset (DIERef::Section section, dw_offset_t cu_offset, uint32_t *idx_ptr=nullptr) |
DWARFUnit * | GetUnitContainingDIEOffset (DIERef::Section section, dw_offset_t die_offset) |
DWARFUnit * | GetUnit (const DIERef &die_ref) |
DWARFTypeUnit * | GetTypeUnitForHash (uint64_t hash) |
bool | ContainsTypeUnits () |
DWARFDIE | GetDIE (const DIERef &die_ref) |
const DWARFDebugAranges & | GetCompileUnitAranges () |
Protected Types | |
typedef std::vector< DWARFUnitSP > | UnitColl |
Protected Attributes | |
SymbolFileDWARF & | m_dwarf |
lldb_private::DWARFContext & | m_context |
llvm::once_flag | m_units_once_flag |
UnitColl | m_units |
std::unique_ptr< DWARFDebugAranges > | m_cu_aranges_up |
std::vector< std::pair< uint64_t, uint32_t > > | m_type_hash_to_unit_index |
Private Member Functions | |
void | ParseUnitHeadersIfNeeded () |
void | ParseUnitsFor (DIERef::Section section) |
uint32_t | FindUnitIndex (DIERef::Section section, dw_offset_t offset) |
DWARFDebugInfo (const DWARFDebugInfo &)=delete | |
const DWARFDebugInfo & | operator= (const DWARFDebugInfo &)=delete |
Definition at line 26 of file DWARFDebugInfo.h.
typedef dw_offset_t(* DWARFDebugInfo::Callback) (SymbolFileDWARF *dwarf2Data, DWARFUnit *cu, DWARFDebugInfoEntry *die, const dw_offset_t next_offset, const uint32_t depth, void *userData) |
Definition at line 28 of file DWARFDebugInfo.h.
|
protected |
Definition at line 58 of file DWARFDebugInfo.h.
anonymous enum |
Enumerator | |
---|---|
eDumpFlag_Verbose | |
eDumpFlag_ShowForm | |
eDumpFlag_ShowAncestors |
Definition at line 48 of file DWARFDebugInfo.h.
|
explicit |
Definition at line 32 of file DWARFDebugInfo.cpp.
|
privatedelete |
bool DWARFDebugInfo::ContainsTypeUnits | ( | ) |
Definition at line 179 of file DWARFDebugInfo.cpp.
References m_type_hash_to_unit_index, and ParseUnitHeadersIfNeeded().
Referenced by SymbolFileDWARF::BuildCuTranslationTable(), SymbolFileDWARFDwo::FindSingleCompileUnit(), and lldb_private::ManualDWARFIndex::Index().
|
private |
Definition at line 125 of file DWARFDebugInfo.cpp.
References DW_INVALID_INDEX, m_units, and ParseUnitHeadersIfNeeded().
Referenced by GetUnitAtOffset(), and GetUnitContainingDIEOffset().
const DWARFDebugAranges & DWARFDebugInfo::GetCompileUnitAranges | ( | ) |
Definition at line 36 of file DWARFDebugInfo.cpp.
References DWARFUnit::BuildAddressRangeTable(), lldb_private::ObjectFile::CanTrustAddressRanges(), DW_INVALID_OFFSET, GetNumUnits(), lldb_private::SymbolFileCommon::GetObjectFile(), DWARFUnit::GetOffset(), lldb_private::DWARFContext::getOrLoadArangesData(), GetUnitAtIndex(), m_context, m_cu_aranges_up, and m_dwarf.
Definition at line 188 of file DWARFDebugInfo.cpp.
References DIERef::die_offset(), DWARFUnit::GetDIE(), DWARFUnit::GetNonSkeletonUnit(), and GetUnit().
Referenced by lldb_private::DebugNamesDWARFIndex::GetCompleteObjCClass(), SymbolFileDWARF::GetDIE(), and SymbolFileDWARFDwo::GetDIE().
size_t DWARFDebugInfo::GetNumUnits | ( | ) |
Definition at line 113 of file DWARFDebugInfo.cpp.
References m_units, and ParseUnitHeadersIfNeeded().
Referenced by SymbolFileDWARF::BuildCuTranslationTable(), SymbolFileDWARF::CalculateNumCompileUnits(), SymbolFileDWARFDwo::FindSingleCompileUnit(), GetCompileUnitAranges(), SymbolFileDWARF::GetMangledNamesForFunction(), GetUnitAtIndex(), lldb_private::ManualDWARFIndex::Index(), and lldb_private::ManualDWARFIndex::IndexUnit().
DWARFTypeUnit * DWARFDebugInfo::GetTypeUnitForHash | ( | uint64_t | hash | ) |
Definition at line 171 of file DWARFDebugInfo.cpp.
References GetUnitAtIndex(), and m_type_hash_to_unit_index.
Referenced by DWARFFormValue::Reference().
Definition at line 157 of file DWARFDebugInfo.cpp.
References DIERef::die_offset(), GetUnitContainingDIEOffset(), and DIERef::section().
Referenced by lldb_private::DebugNamesDWARFIndex::GetCompleteObjCClass(), and GetDIE().
DWARFUnit * DWARFDebugInfo::GetUnitAtIndex | ( | size_t | idx | ) |
Definition at line 118 of file DWARFDebugInfo.cpp.
References GetNumUnits(), and m_units.
Referenced by SymbolFileDWARF::BuildCuTranslationTable(), SymbolFileDWARFDwo::FindSingleCompileUnit(), GetCompileUnitAranges(), SymbolFileDWARF::GetDIE(), SymbolFileDWARF::GetDWARFCompileUnit(), SymbolFileDWARF::GetMangledNamesForFunction(), GetTypeUnitForHash(), GetUnitAtOffset(), GetUnitContainingDIEOffset(), lldb_private::ManualDWARFIndex::Index(), lldb_private::ManualDWARFIndex::IndexUnit(), SymbolFileDWARF::ParseVariablesForContext(), SymbolFileDWARF::Supports_DW_AT_APPLE_objc_complete_type(), and SymbolFileDWARF::UpdateExternalModuleListIfNeeded().
DWARFUnit * DWARFDebugInfo::GetUnitAtOffset | ( | DIERef::Section | section, |
dw_offset_t | cu_offset, | ||
uint32_t * | idx_ptr = nullptr |
||
) |
Definition at line 143 of file DWARFDebugInfo.cpp.
References DW_INVALID_INDEX, FindUnitIndex(), DWARFUnit::GetOffset(), and GetUnitAtIndex().
Referenced by lldb_private::DebugNamesDWARFIndex::ToDIERef().
DWARFUnit * DWARFDebugInfo::GetUnitContainingDIEOffset | ( | DIERef::Section | section, |
dw_offset_t | die_offset | ||
) |
Definition at line 162 of file DWARFDebugInfo.cpp.
References DWARFUnit::ContainsDIEOffset(), FindUnitIndex(), and GetUnitAtIndex().
Referenced by GetUnit(), and DWARFFormValue::Reference().
|
privatedelete |
|
private |
Definition at line 105 of file DWARFDebugInfo.cpp.
References DIERef::DebugInfo, DIERef::DebugTypes, m_type_hash_to_unit_index, m_units_once_flag, and ParseUnitsFor().
Referenced by ContainsTypeUnits(), FindUnitIndex(), and GetNumUnits().
|
private |
Definition at line 78 of file DWARFDebugInfo.cpp.
References DIERef::DebugTypes, DWARFUnit::extract(), lldb_private::DWARFContext::getOrLoadDebugInfoData(), lldb_private::DWARFContext::getOrLoadDebugTypesData(), m_context, m_dwarf, m_type_hash_to_unit_index, m_units, and lldb_private::DataExtractor::ValidOffset().
Referenced by ParseUnitHeadersIfNeeded().
|
protected |
Definition at line 61 of file DWARFDebugInfo.h.
Referenced by GetCompileUnitAranges(), and ParseUnitsFor().
|
protected |
Definition at line 67 of file DWARFDebugInfo.h.
Referenced by GetCompileUnitAranges().
|
protected |
Definition at line 60 of file DWARFDebugInfo.h.
Referenced by GetCompileUnitAranges(), and ParseUnitsFor().
|
protected |
Definition at line 69 of file DWARFDebugInfo.h.
Referenced by ContainsTypeUnits(), GetTypeUnitForHash(), ParseUnitHeadersIfNeeded(), and ParseUnitsFor().
|
protected |
Definition at line 64 of file DWARFDebugInfo.h.
Referenced by FindUnitIndex(), GetNumUnits(), GetUnitAtIndex(), and ParseUnitsFor().
|
protected |
Definition at line 63 of file DWARFDebugInfo.h.
Referenced by ParseUnitHeadersIfNeeded().