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, 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) |
DWARFUnit * | GetSkeletonUnit (DWARFUnit *dwo_unit) |
DWARFTypeUnit * | GetTypeUnitForHash (uint64_t hash) |
bool | ContainsTypeUnits () |
DWARFDIE | GetDIE (const DIERef &die_ref) |
llvm::StringRef | PeekDIEName (const DIERef &die_ref) |
Returns the AT_Name of this DIE, if it exists, without parsing the entire compile unit. | |
const DWARFDebugAranges & | GetCompileUnitAranges () |
Protected Types | |
typedef std::vector< DWARFUnitSP > | UnitColl |
Protected Attributes | |
SymbolFileDWARF & | m_dwarf |
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 |
llvm::DenseMap< uint64_t, DWARFUnit * > | m_dwarf5_dwo_id_to_skeleton_unit |
llvm::DenseMap< uint64_t, DWARFUnit * > | m_dwarf4_dwo_id_to_skeleton_unit |
llvm::once_flag | m_dwarf4_dwo_id_to_skeleton_unit_once_flag |
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(* lldb_private::plugin::dwarf::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 62 of file DWARFDebugInfo.h.
anonymous enum |
Enumerator | |
---|---|
eDumpFlag_Verbose | |
eDumpFlag_ShowForm | |
eDumpFlag_ShowAncestors |
Definition at line 52 of file DWARFDebugInfo.h.
|
explicit |
Definition at line 34 of file DWARFDebugInfo.cpp.
|
privatedelete |
bool DWARFDebugInfo::ContainsTypeUnits | ( | ) |
Definition at line 247 of file DWARFDebugInfo.cpp.
References m_type_hash_to_unit_index, and ParseUnitHeadersIfNeeded().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::BuildCuTranslationTable(), lldb_private::plugin::dwarf::SymbolFileDWARFDwo::FindSingleCompileUnit(), and lldb_private::plugin::dwarf::ManualDWARFIndex::Index().
|
private |
Definition at line 193 of file DWARFDebugInfo.cpp.
References DW_INVALID_INDEX, m_units, and ParseUnitHeadersIfNeeded().
Referenced by GetUnitAtOffset(), and GetUnitContainingDIEOffset().
const DWARFDebugAranges & DWARFDebugInfo::GetCompileUnitAranges | ( | ) |
Definition at line 37 of file DWARFDebugInfo.cpp.
References lldb_private::plugin::dwarf::DWARFUnit::BuildAddressRangeTable(), lldb_private::ObjectFile::CanTrustAddressRanges(), DW_INVALID_OFFSET, GetNumUnits(), lldb_private::SymbolFileCommon::GetObjectFile(), lldb_private::plugin::dwarf::DWARFUnit::GetOffset(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadArangesData(), GetUnitAtIndex(), m_context, m_cu_aranges_up, and m_dwarf.
Definition at line 256 of file DWARFDebugInfo.cpp.
References lldb_private::plugin::dwarf::DIERef::die_offset(), lldb_private::plugin::dwarf::DWARFUnit::GetDIE(), lldb_private::plugin::dwarf::DWARFUnit::GetNonSkeletonUnit(), and GetUnit().
Referenced by lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetCompleteObjCClass(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDIE(), and lldb_private::plugin::dwarf::SymbolFileDWARFDwo::GetDIE().
size_t DWARFDebugInfo::GetNumUnits | ( | ) |
Definition at line 181 of file DWARFDebugInfo.cpp.
References m_units, and ParseUnitHeadersIfNeeded().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::BuildCuTranslationTable(), lldb_private::plugin::dwarf::SymbolFileDWARF::CalculateNumCompileUnits(), lldb_private::plugin::dwarf::SymbolFileDWARFDwo::FindSingleCompileUnit(), GetCompileUnitAranges(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDebugInfoSize(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetMangledNamesForFunction(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), GetSkeletonUnit(), GetUnitAtIndex(), lldb_private::plugin::dwarf::ManualDWARFIndex::Index(), and lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit().
Definition at line 124 of file DWARFDebugInfo.cpp.
References lldb_private::plugin::dwarf::DWARFUnit::GetDWOId(), GetNumUnits(), GetUnitAtIndex(), lldb_private::plugin::dwarf::DWARFUnit::GetVersion(), lldb_private::plugin::dwarf::DWARFUnit::IsDWOUnit(), m_dwarf4_dwo_id_to_skeleton_unit, m_dwarf4_dwo_id_to_skeleton_unit_once_flag, m_dwarf5_dwo_id_to_skeleton_unit, and ParseUnitHeadersIfNeeded().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::GetSkeletonUnit().
DWARFTypeUnit * DWARFDebugInfo::GetTypeUnitForHash | ( | uint64_t | hash | ) |
Definition at line 239 of file DWARFDebugInfo.cpp.
References GetUnitAtIndex(), and m_type_hash_to_unit_index.
Referenced by lldb_private::plugin::dwarf::DWARFFormValue::ReferencedUnitAndOffset().
Definition at line 225 of file DWARFDebugInfo.cpp.
References lldb_private::plugin::dwarf::DIERef::die_offset(), GetUnitContainingDIEOffset(), and lldb_private::plugin::dwarf::DIERef::section().
Referenced by lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetCompleteObjCClass(), GetDIE(), and PeekDIEName().
DWARFUnit * DWARFDebugInfo::GetUnitAtIndex | ( | size_t | idx | ) |
Definition at line 186 of file DWARFDebugInfo.cpp.
References GetNumUnits(), and m_units.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::BuildCuTranslationTable(), lldb_private::plugin::dwarf::SymbolFileDWARFDwo::FindSingleCompileUnit(), GetCompileUnitAranges(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDebugInfoSize(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDIE(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFCompileUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetMangledNamesForFunction(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), GetSkeletonUnit(), GetTypeUnitForHash(), GetUnitAtOffset(), GetUnitContainingDIEOffset(), lldb_private::plugin::dwarf::ManualDWARFIndex::Index(), lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesForContext(), lldb_private::plugin::dwarf::SymbolFileDWARF::Supports_DW_AT_APPLE_objc_complete_type(), and lldb_private::plugin::dwarf::SymbolFileDWARF::UpdateExternalModuleListIfNeeded().
DWARFUnit * DWARFDebugInfo::GetUnitAtOffset | ( | DIERef::Section | section, |
dw_offset_t | cu_offset, | ||
uint32_t * | idx_ptr = nullptr |
||
) |
Definition at line 211 of file DWARFDebugInfo.cpp.
References DW_INVALID_INDEX, FindUnitIndex(), lldb_private::plugin::dwarf::DWARFUnit::GetOffset(), and GetUnitAtIndex().
Referenced by lldb_private::plugin::dwarf::DebugNamesDWARFIndex::ToDIERef().
DWARFUnit * DWARFDebugInfo::GetUnitContainingDIEOffset | ( | DIERef::Section | section, |
dw_offset_t | die_offset | ||
) |
Definition at line 230 of file DWARFDebugInfo.cpp.
References lldb_private::plugin::dwarf::DWARFUnit::ContainsDIEOffset(), FindUnitIndex(), and GetUnitAtIndex().
Referenced by GetUnit(), and lldb_private::plugin::dwarf::DWARFFormValue::ReferencedUnitAndOffset().
|
privatedelete |
|
private |
Definition at line 173 of file DWARFDebugInfo.cpp.
References lldb_private::plugin::dwarf::DIERef::DebugInfo, lldb_private::plugin::dwarf::DIERef::DebugTypes, m_type_hash_to_unit_index, m_units_once_flag, and ParseUnitsFor().
Referenced by ContainsTypeUnits(), FindUnitIndex(), GetNumUnits(), and GetSkeletonUnit().
|
private |
Definition at line 79 of file DWARFDebugInfo.cpp.
References lldb_private::DebugInfo, lldb_private::plugin::dwarf::DIERef::DebugTypes, lldb_private::plugin::dwarf::DWARFUnit::extract(), lldb_private::GetLog(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadDebugInfoData(), lldb_private::plugin::dwarf::DWARFContext::getOrLoadDebugTypesData(), LLDB_LOG, m_context, m_dwarf, m_dwarf5_dwo_id_to_skeleton_unit, m_type_hash_to_unit_index, m_units, and lldb_private::DataExtractor::ValidOffset().
Referenced by ParseUnitHeadersIfNeeded().
llvm::StringRef DWARFDebugInfo::PeekDIEName | ( | const DIERef & | die_ref | ) |
Returns the AT_Name of this DIE, if it exists, without parsing the entire compile unit.
An empty is string is returned upon error or if the attribute is not present.
Definition at line 263 of file DWARFDebugInfo.cpp.
References lldb_private::plugin::dwarf::DIERef::die_offset(), and GetUnit().
Referenced by lldb_private::plugin::dwarf::DebugNamesDWARFIndex::SameParentChain().
|
protected |
Definition at line 65 of file DWARFDebugInfo.h.
Referenced by GetCompileUnitAranges(), and ParseUnitsFor().
|
protected |
Definition at line 71 of file DWARFDebugInfo.h.
Referenced by GetCompileUnitAranges().
|
protected |
Definition at line 64 of file DWARFDebugInfo.h.
Referenced by GetCompileUnitAranges(), and ParseUnitsFor().
|
protected |
Definition at line 75 of file DWARFDebugInfo.h.
Referenced by GetSkeletonUnit().
|
protected |
Definition at line 76 of file DWARFDebugInfo.h.
Referenced by GetSkeletonUnit().
|
protected |
Definition at line 74 of file DWARFDebugInfo.h.
Referenced by GetSkeletonUnit(), and ParseUnitsFor().
|
protected |
Definition at line 73 of file DWARFDebugInfo.h.
Referenced by ContainsTypeUnits(), GetTypeUnitForHash(), ParseUnitHeadersIfNeeded(), and ParseUnitsFor().
|
protected |
Definition at line 68 of file DWARFDebugInfo.h.
Referenced by FindUnitIndex(), GetNumUnits(), GetUnitAtIndex(), and ParseUnitsFor().
|
protected |
Definition at line 67 of file DWARFDebugInfo.h.
Referenced by ParseUnitHeadersIfNeeded().