LLDB mainline
Public Types | Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | List of all members
lldb_private::plugin::dwarf::DWARFDebugInfo Class Reference

#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 ()
 
DWARFUnitGetUnitAtIndex (size_t idx)
 
DWARFUnitGetUnitAtOffset (DIERef::Section section, dw_offset_t cu_offset, uint32_t *idx_ptr=nullptr)
 
DWARFUnitGetUnitContainingDIEOffset (DIERef::Section section, dw_offset_t die_offset)
 
DWARFUnitGetUnit (const DIERef &die_ref)
 
DWARFUnitGetSkeletonUnit (DWARFUnit *dwo_unit)
 
DWARFTypeUnitGetTypeUnitForHash (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 DWARFDebugArangesGetCompileUnitAranges ()
 

Protected Types

typedef std::vector< DWARFUnitSPUnitColl
 

Protected Attributes

SymbolFileDWARFm_dwarf
 
DWARFContextm_context
 
llvm::once_flag m_units_once_flag
 
UnitColl m_units
 
std::unique_ptr< DWARFDebugArangesm_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 DWARFDebugInfooperator= (const DWARFDebugInfo &)=delete
 

Detailed Description

Definition at line 26 of file DWARFDebugInfo.h.

Member Typedef Documentation

◆ Callback

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.

◆ UnitColl

Definition at line 62 of file DWARFDebugInfo.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
eDumpFlag_Verbose 
eDumpFlag_ShowForm 
eDumpFlag_ShowAncestors 

Definition at line 52 of file DWARFDebugInfo.h.

Constructor & Destructor Documentation

◆ DWARFDebugInfo() [1/2]

DWARFDebugInfo::DWARFDebugInfo ( SymbolFileDWARF dwarf,
DWARFContext context 
)
explicit

Definition at line 34 of file DWARFDebugInfo.cpp.

◆ DWARFDebugInfo() [2/2]

lldb_private::plugin::dwarf::DWARFDebugInfo::DWARFDebugInfo ( const DWARFDebugInfo )
privatedelete

Member Function Documentation

◆ ContainsTypeUnits()

bool DWARFDebugInfo::ContainsTypeUnits ( )

◆ FindUnitIndex()

uint32_t DWARFDebugInfo::FindUnitIndex ( DIERef::Section  section,
dw_offset_t  offset 
)
private

◆ GetCompileUnitAranges()

const DWARFDebugAranges & DWARFDebugInfo::GetCompileUnitAranges ( )

◆ GetDIE()

DWARFDIE DWARFDebugInfo::GetDIE ( const DIERef die_ref)

◆ GetNumUnits()

size_t DWARFDebugInfo::GetNumUnits ( )

◆ GetSkeletonUnit()

DWARFUnit * DWARFDebugInfo::GetSkeletonUnit ( DWARFUnit dwo_unit)

◆ GetTypeUnitForHash()

DWARFTypeUnit * DWARFDebugInfo::GetTypeUnitForHash ( uint64_t  hash)

◆ GetUnit()

DWARFUnit * DWARFDebugInfo::GetUnit ( const DIERef die_ref)

◆ GetUnitAtIndex()

DWARFUnit * DWARFDebugInfo::GetUnitAtIndex ( size_t  idx)

◆ GetUnitAtOffset()

DWARFUnit * DWARFDebugInfo::GetUnitAtOffset ( DIERef::Section  section,
dw_offset_t  cu_offset,
uint32_t *  idx_ptr = nullptr 
)

◆ GetUnitContainingDIEOffset()

DWARFUnit * DWARFDebugInfo::GetUnitContainingDIEOffset ( DIERef::Section  section,
dw_offset_t  die_offset 
)

◆ operator=()

const DWARFDebugInfo & lldb_private::plugin::dwarf::DWARFDebugInfo::operator= ( const DWARFDebugInfo )
privatedelete

◆ ParseUnitHeadersIfNeeded()

void DWARFDebugInfo::ParseUnitHeadersIfNeeded ( )
private

◆ ParseUnitsFor()

void DWARFDebugInfo::ParseUnitsFor ( DIERef::Section  section)
private

◆ PeekDIEName()

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().

Member Data Documentation

◆ m_context

DWARFContext& lldb_private::plugin::dwarf::DWARFDebugInfo::m_context
protected

Definition at line 65 of file DWARFDebugInfo.h.

Referenced by GetCompileUnitAranges(), and ParseUnitsFor().

◆ m_cu_aranges_up

std::unique_ptr<DWARFDebugAranges> lldb_private::plugin::dwarf::DWARFDebugInfo::m_cu_aranges_up
protected

Definition at line 71 of file DWARFDebugInfo.h.

Referenced by GetCompileUnitAranges().

◆ m_dwarf

SymbolFileDWARF& lldb_private::plugin::dwarf::DWARFDebugInfo::m_dwarf
protected

Definition at line 64 of file DWARFDebugInfo.h.

Referenced by GetCompileUnitAranges(), and ParseUnitsFor().

◆ m_dwarf4_dwo_id_to_skeleton_unit

llvm::DenseMap<uint64_t, DWARFUnit *> lldb_private::plugin::dwarf::DWARFDebugInfo::m_dwarf4_dwo_id_to_skeleton_unit
protected

Definition at line 75 of file DWARFDebugInfo.h.

Referenced by GetSkeletonUnit().

◆ m_dwarf4_dwo_id_to_skeleton_unit_once_flag

llvm::once_flag lldb_private::plugin::dwarf::DWARFDebugInfo::m_dwarf4_dwo_id_to_skeleton_unit_once_flag
protected

Definition at line 76 of file DWARFDebugInfo.h.

Referenced by GetSkeletonUnit().

◆ m_dwarf5_dwo_id_to_skeleton_unit

llvm::DenseMap<uint64_t, DWARFUnit *> lldb_private::plugin::dwarf::DWARFDebugInfo::m_dwarf5_dwo_id_to_skeleton_unit
protected

Definition at line 74 of file DWARFDebugInfo.h.

Referenced by GetSkeletonUnit(), and ParseUnitsFor().

◆ m_type_hash_to_unit_index

std::vector<std::pair<uint64_t, uint32_t> > lldb_private::plugin::dwarf::DWARFDebugInfo::m_type_hash_to_unit_index
protected

◆ m_units

UnitColl lldb_private::plugin::dwarf::DWARFDebugInfo::m_units
protected

Definition at line 68 of file DWARFDebugInfo.h.

Referenced by FindUnitIndex(), GetNumUnits(), GetUnitAtIndex(), and ParseUnitsFor().

◆ m_units_once_flag

llvm::once_flag lldb_private::plugin::dwarf::DWARFDebugInfo::m_units_once_flag
protected

Definition at line 67 of file DWARFDebugInfo.h.

Referenced by ParseUnitHeadersIfNeeded().


The documentation for this class was generated from the following files: