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 * | GetSkeletonUnit (DWARFUnit *dwo_unit) |
DWARFTypeUnit * | GetTypeUnitForHash (uint64_t hash) |
bool | ContainsTypeUnits () |
DWARFDIE | GetDIE (DIERef::Section section, dw_offset_t die_offset) |
const DWARFDebugAranges & | GetCompileUnitAranges () |
const std::shared_ptr< SymbolFileDWARFDwo > & | GetDwpSymbolFile () |
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 58 of file DWARFDebugInfo.h.
anonymous enum |
Enumerator | |
---|---|
eDumpFlag_Verbose | |
eDumpFlag_ShowForm | |
eDumpFlag_ShowAncestors |
Definition at line 46 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.
DWARFDIE DWARFDebugInfo::GetDIE | ( | DIERef::Section | section, |
dw_offset_t | die_offset | ||
) |
Definition at line 256 of file DWARFDebugInfo.cpp.
References lldb_private::plugin::dwarf::DWARFDIE::GetDIE(), and GetUnitContainingDIEOffset().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::GetDIE(), and lldb_private::plugin::dwarf::SymbolFileDWARFDwo::GetDIE().
const std::shared_ptr< SymbolFileDWARFDwo > & DWARFDebugInfo::GetDwpSymbolFile | ( | ) |
Definition at line 235 of file DWARFDebugInfo.cpp.
References lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwpSymbolFile(), and m_dwarf.
Referenced by lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetForeignTypeUnit().
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::DebugNamesDWARFIndex::GetForeignTypeUnit(), and lldb_private::plugin::dwarf::DWARFFormValue::ReferencedUnitAndOffset().
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::GetDIERefSymbolFile(), 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(), 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::GetForeignTypeUnit(), and lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetNonSkeletonUnit().
DWARFUnit * DWARFDebugInfo::GetUnitContainingDIEOffset | ( | DIERef::Section | section, |
dw_offset_t | die_offset | ||
) |
Definition at line 226 of file DWARFDebugInfo.cpp.
References lldb_private::plugin::dwarf::DWARFUnit::ContainsDIEOffset(), FindUnitIndex(), and GetUnitAtIndex().
Referenced by GetDIE(), 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().
|
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(), GetDwpSymbolFile(), and ParseUnitsFor().
|
protected |
Definition at line 71 of file DWARFDebugInfo.h.
Referenced by GetSkeletonUnit().
|
protected |
Definition at line 72 of file DWARFDebugInfo.h.
Referenced by GetSkeletonUnit().
|
protected |
Definition at line 70 of file DWARFDebugInfo.h.
Referenced by GetSkeletonUnit(), 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().