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

#include <DWARFDebugInfo.h>

Collaboration diagram for DWARFDebugInfo:
Collaboration graph

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 ()
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)
DWARFTypeUnitGetTypeUnitForHash (uint64_t hash)
bool ContainsTypeUnits ()
DWARFDIE GetDIEForDIEOffset (DIERef::Section section, dw_offset_t die_offset)
DWARFDIE GetDIE (const DIERef &die_ref)
const DWARFDebugArangesGetCompileUnitAranges ()

Protected Types

typedef std::vector< DWARFUnitSPUnitColl

Protected Attributes

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

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(* 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

typedef std::vector<DWARFUnitSP> DWARFDebugInfo::UnitColl

Definition at line 60 of file DWARFDebugInfo.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 50 of file DWARFDebugInfo.h.

Constructor & Destructor Documentation

◆ DWARFDebugInfo() [1/2]

DWARFDebugInfo::DWARFDebugInfo ( SymbolFileDWARF dwarf,
lldb_private::DWARFContext context 

Definition at line 33 of file DWARFDebugInfo.cpp.

◆ DWARFDebugInfo() [2/2]

DWARFDebugInfo::DWARFDebugInfo ( const DWARFDebugInfo )

Member Function Documentation

◆ ContainsTypeUnits()

bool DWARFDebugInfo::ContainsTypeUnits ( )

◆ FindUnitIndex()

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

◆ GetCompileUnitAranges()

const DWARFDebugAranges & DWARFDebugInfo::GetCompileUnitAranges ( )

◆ GetDIE()

DWARFDIE DWARFDebugInfo::GetDIE ( const DIERef die_ref)

◆ GetDIEForDIEOffset()

DWARFDIE DWARFDebugInfo::GetDIEForDIEOffset ( DIERef::Section  section,
dw_offset_t  die_offset 

Definition at line 178 of file DWARFDebugInfo.cpp.

References DWARFUnit::GetDIE(), and GetUnitContainingDIEOffset().

◆ GetNumUnits()

size_t DWARFDebugInfo::GetNumUnits ( )

◆ GetTypeUnitForHash()

DWARFTypeUnit * DWARFDebugInfo::GetTypeUnitForHash ( uint64_t  hash)

Definition at line 164 of file DWARFDebugInfo.cpp.

References GetUnitAtIndex(), and m_type_hash_to_unit_index.

Referenced by DWARFFormValue::Reference().

◆ GetUnit()

DWARFUnit * DWARFDebugInfo::GetUnit ( const DIERef die_ref)

Definition at line 150 of file DWARFDebugInfo.cpp.

References DIERef::die_offset(), GetUnitContainingDIEOffset(), and DIERef::section().

Referenced by GetDIE().

◆ 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& DWARFDebugInfo::operator= ( const DWARFDebugInfo )

◆ ParseUnitHeadersIfNeeded()

void DWARFDebugInfo::ParseUnitHeadersIfNeeded ( )

◆ ParseUnitsFor()

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

Member Data Documentation

◆ m_context

lldb_private::DWARFContext& DWARFDebugInfo::m_context

Definition at line 63 of file DWARFDebugInfo.h.

Referenced by GetCompileUnitAranges(), and ParseUnitsFor().

◆ m_cu_aranges_up

std::unique_ptr<DWARFDebugAranges> DWARFDebugInfo::m_cu_aranges_up

Definition at line 69 of file DWARFDebugInfo.h.

Referenced by GetCompileUnitAranges().

◆ m_dwarf

SymbolFileDWARF& DWARFDebugInfo::m_dwarf

Definition at line 62 of file DWARFDebugInfo.h.

Referenced by ParseUnitsFor().

◆ m_type_hash_to_unit_index

std::vector<std::pair<uint64_t, uint32_t> > DWARFDebugInfo::m_type_hash_to_unit_index

◆ m_units

UnitColl DWARFDebugInfo::m_units

Definition at line 66 of file DWARFDebugInfo.h.

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

◆ m_units_once_flag

llvm::once_flag DWARFDebugInfo::m_units_once_flag

Definition at line 65 of file DWARFDebugInfo.h.

Referenced by ParseUnitHeadersIfNeeded().

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