LLDB  mainline
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
DWARFDebugInfoEntry Class Reference

#include <DWARFDebugInfoEntry.h>

Collaboration diagram for DWARFDebugInfoEntry:
Collaboration graph
[legend]

Public Types

typedef std::vector< DWARFDebugInfoEntrycollection
 
typedef collection::iterator iterator
 
typedef collection::const_iterator const_iterator
 
typedef std::vector< dw_offset_toffset_collection
 
typedef offset_collection::iterator offset_collection_iterator
 
typedef offset_collection::const_iterator offset_collection_const_iterator
 

Public Member Functions

 DWARFDebugInfoEntry ()
 
 operator bool () const
 
bool operator== (const DWARFDebugInfoEntry &rhs) const
 
bool operator!= (const DWARFDebugInfoEntry &rhs) const
 
void BuildAddressRangeTable (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, DWARFDebugAranges *debug_aranges) const
 
void BuildFunctionAddressRangeTable (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, DWARFDebugAranges *debug_aranges) const
 
bool FastExtract (const lldb_private::DWARFDataExtractor &debug_info_data, const DWARFUnit *cu, const DWARFFormValue::FixedFormSizes &fixed_form_sizes, lldb::offset_t *offset_ptr)
 
bool Extract (const DWARFUnit *cu, lldb::offset_t *offset_ptr)
 
bool LookupAddress (const dw_addr_t address, SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, DWARFDebugInfoEntry **function_die, DWARFDebugInfoEntry **block_die)
 
size_t GetAttributes (const DWARFUnit *cu, DWARFFormValue::FixedFormSizes fixed_form_sizes, DWARFAttributes &attrs, uint32_t curr_depth=0) const
 
dw_offset_t GetAttributeValue (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, const dw_attr_t attr, DWARFFormValue &formValue, dw_offset_t *end_attr_offset_ptr=nullptr, bool check_specification_or_abstract_origin=false) const
 
const char * GetAttributeValueAsString (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, const dw_attr_t attr, const char *fail_value, bool check_specification_or_abstract_origin=false) const
 
uint64_t GetAttributeValueAsUnsigned (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, const dw_attr_t attr, uint64_t fail_value, bool check_specification_or_abstract_origin=false) const
 
uint64_t GetAttributeValueAsReference (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, const dw_attr_t attr, uint64_t fail_value, bool check_specification_or_abstract_origin=false) const
 
uint64_t GetAttributeValueAsAddress (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, const dw_attr_t attr, uint64_t fail_value, bool check_specification_or_abstract_origin=false) const
 
dw_addr_t GetAttributeHighPC (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, dw_addr_t lo_pc, uint64_t fail_value, bool check_specification_or_abstract_origin=false) const
 
bool GetAttributeAddressRange (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, dw_addr_t &lo_pc, dw_addr_t &hi_pc, uint64_t fail_value, bool check_specification_or_abstract_origin=false) const
 
size_t GetAttributeAddressRanges (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, DWARFRangeList &ranges, bool check_hi_lo_pc, bool check_specification_or_abstract_origin=false) const
 
const char * GetName (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu) const
 
const char * GetMangledName (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, bool substitute_name_allowed=true) const
 
const char * GetPubname (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu) const
 
const char * GetQualifiedName (SymbolFileDWARF *dwarf2Data, DWARFUnit *cu, std::string &storage) const
 
const char * GetQualifiedName (SymbolFileDWARF *dwarf2Data, DWARFUnit *cu, const DWARFAttributes &attributes, std::string &storage) const
 
void Dump (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, lldb_private::Stream &s, uint32_t recurse_depth) const
 
bool GetDIENamesAndRanges (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, const char *&name, const char *&mangled, DWARFRangeList &rangeList, int &decl_file, int &decl_line, int &decl_column, int &call_file, int &call_line, int &call_column, lldb_private::DWARFExpression *frame_base=NULL) const
 
const DWARFAbbreviationDeclarationGetAbbreviationDeclarationPtr (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, lldb::offset_t &offset) const
 
dw_tag_t Tag () const
 
bool IsNULL () const
 
dw_offset_t GetOffset () const
 
bool HasChildren () const
 
void SetHasChildren (bool b)
 
DWARFDebugInfoEntryGetParent ()
 
const DWARFDebugInfoEntryGetParent () const
 
DWARFDebugInfoEntryGetSibling ()
 
const DWARFDebugInfoEntryGetSibling () const
 
DWARFDebugInfoEntryGetFirstChild ()
 
const DWARFDebugInfoEntryGetFirstChild () const
 
std::vector< DWARFDIEGetDeclContextDIEs (DWARFUnit *cu) const
 
void GetDWARFDeclContext (SymbolFileDWARF *dwarf2Data, DWARFUnit *cu, DWARFDeclContext &dwarf_decl_ctx) const
 
bool MatchesDWARFDeclContext (SymbolFileDWARF *dwarf2Data, DWARFUnit *cu, const DWARFDeclContext &dwarf_decl_ctx) const
 
DWARFDIE GetParentDeclContextDIE (SymbolFileDWARF *dwarf2Data, DWARFUnit *cu) const
 
DWARFDIE GetParentDeclContextDIE (SymbolFileDWARF *dwarf2Data, DWARFUnit *cu, const DWARFAttributes &attributes) const
 
void SetParent (DWARFDebugInfoEntry *parent)
 
void SetSibling (DWARFDebugInfoEntry *sibling)
 
void SetSiblingIndex (uint32_t idx)
 
void SetParentIndex (uint32_t idx)
 

Static Public Member Functions

static bool GetName (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, const dw_offset_t die_offset, lldb_private::Stream &s)
 
static bool AppendTypeName (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, const dw_offset_t die_offset, lldb_private::Stream &s)
 
static bool OffsetLessThan (const DWARFDebugInfoEntry &a, const DWARFDebugInfoEntry &b)
 
static void DumpAttribute (SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, const lldb_private::DWARFDataExtractor &debug_info_data, lldb::offset_t *offset_ptr, lldb_private::Stream &s, dw_attr_t attr, DWARFFormValue &form_value)
 

Protected Attributes

dw_offset_t m_offset
 
uint32_t m_parent_idx
 
uint32_t m_sibling_idx: 31
 
uint32_t m_has_children: 1
 
uint16_t m_abbr_idx
 
uint16_t m_tag
 

Detailed Description

Definition at line 46 of file DWARFDebugInfoEntry.h.

Member Typedef Documentation

◆ collection

Definition at line 48 of file DWARFDebugInfoEntry.h.

◆ const_iterator

typedef collection::const_iterator DWARFDebugInfoEntry::const_iterator

Definition at line 50 of file DWARFDebugInfoEntry.h.

◆ iterator

typedef collection::iterator DWARFDebugInfoEntry::iterator

Definition at line 49 of file DWARFDebugInfoEntry.h.

◆ offset_collection

Definition at line 52 of file DWARFDebugInfoEntry.h.

◆ offset_collection_const_iterator

typedef offset_collection::const_iterator DWARFDebugInfoEntry::offset_collection_const_iterator

Definition at line 54 of file DWARFDebugInfoEntry.h.

◆ offset_collection_iterator

typedef offset_collection::iterator DWARFDebugInfoEntry::offset_collection_iterator

Definition at line 53 of file DWARFDebugInfoEntry.h.

Constructor & Destructor Documentation

◆ DWARFDebugInfoEntry()

DWARFDebugInfoEntry::DWARFDebugInfoEntry ( )
inline

Definition at line 56 of file DWARFDebugInfoEntry.h.

Member Function Documentation

◆ AppendTypeName()

bool DWARFDebugInfoEntry::AppendTypeName ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
const dw_offset_t  die_offset,
lldb_private::Stream s 
)
static

◆ BuildAddressRangeTable()

void DWARFDebugInfoEntry::BuildAddressRangeTable ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
DWARFDebugAranges debug_aranges 
) const

printf("BuildAddressRangeTable() 0x%8.8x: %30s: [0x%8.8x - 0x%8.8x)\n", m_offset, DW_TAG_value_to_name(tag), lo_pc, hi_pc);

Definition at line 1238 of file DWARFDebugInfoEntry.cpp.

References DWARFDebugAranges::AppendRange(), BuildAddressRangeTable(), DWARFUnit::GetOffset(), GetSibling(), and LLDB_INVALID_ADDRESS.

Referenced by BuildAddressRangeTable(), DWARFUnit::BuildAddressRangeTable(), and operator bool().

◆ BuildFunctionAddressRangeTable()

void DWARFDebugInfoEntry::BuildFunctionAddressRangeTable ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
DWARFDebugAranges debug_aranges 
) const

◆ Dump()

void DWARFDebugInfoEntry::Dump ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
lldb_private::Stream s,
uint32_t  recurse_depth 
) const

◆ DumpAttribute()

void DWARFDebugInfoEntry::DumpAttribute ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
const lldb_private::DWARFDataExtractor debug_info_data,
lldb::offset_t offset_ptr,
lldb_private::Stream s,
dw_attr_t  attr,
DWARFFormValue form_value 
)
static

◆ Extract()

bool DWARFDebugInfoEntry::Extract ( const DWARFUnit cu,
lldb::offset_t offset_ptr 
)

◆ FastExtract()

bool DWARFDebugInfoEntry::FastExtract ( const lldb_private::DWARFDataExtractor debug_info_data,
const DWARFUnit cu,
const DWARFFormValue::FixedFormSizes fixed_form_sizes,
lldb::offset_t offset_ptr 
)

◆ GetAbbreviationDeclarationPtr()

const DWARFAbbreviationDeclaration * DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
lldb::offset_t offset 
) const

◆ GetAttributeAddressRange()

bool DWARFDebugInfoEntry::GetAttributeAddressRange ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
dw_addr_t lo_pc,
dw_addr_t hi_pc,
uint64_t  fail_value,
bool  check_specification_or_abstract_origin = false 
) const

Definition at line 974 of file DWARFDebugInfoEntry.cpp.

Referenced by operator bool().

◆ GetAttributeAddressRanges()

size_t DWARFDebugInfoEntry::GetAttributeAddressRanges ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
DWARFRangeList ranges,
bool  check_hi_lo_pc,
bool  check_specification_or_abstract_origin = false 
) const

◆ GetAttributeHighPC()

dw_addr_t DWARFDebugInfoEntry::GetAttributeHighPC ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
dw_addr_t  lo_pc,
uint64_t  fail_value,
bool  check_specification_or_abstract_origin = false 
) const

◆ GetAttributes()

size_t DWARFDebugInfoEntry::GetAttributes ( const DWARFUnit cu,
DWARFFormValue::FixedFormSizes  fixed_form_sizes,
DWARFAttributes attrs,
uint32_t  curr_depth = 0 
) const

◆ GetAttributeValue()

dw_offset_t DWARFDebugInfoEntry::GetAttributeValue ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
const dw_attr_t  attr,
DWARFFormValue formValue,
dw_offset_t end_attr_offset_ptr = nullptr,
bool  check_specification_or_abstract_origin = false 
) const

◆ GetAttributeValueAsAddress()

uint64_t DWARFDebugInfoEntry::GetAttributeValueAsAddress ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
const dw_attr_t  attr,
uint64_t  fail_value,
bool  check_specification_or_abstract_origin = false 
) const

Definition at line 934 of file DWARFDebugInfoEntry.cpp.

References DWARFFormValue::Address().

Referenced by operator bool(), and SetDwoStrOffsetsBase().

◆ GetAttributeValueAsReference()

uint64_t DWARFDebugInfoEntry::GetAttributeValueAsReference ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
const dw_attr_t  attr,
uint64_t  fail_value,
bool  check_specification_or_abstract_origin = false 
) const

Definition at line 923 of file DWARFDebugInfoEntry.cpp.

References DWARFFormValue::Reference().

Referenced by operator bool().

◆ GetAttributeValueAsString()

const char * DWARFDebugInfoEntry::GetAttributeValueAsString ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
const dw_attr_t  attr,
const char *  fail_value,
bool  check_specification_or_abstract_origin = false 
) const

◆ GetAttributeValueAsUnsigned()

uint64_t DWARFDebugInfoEntry::GetAttributeValueAsUnsigned ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
const dw_attr_t  attr,
uint64_t  fail_value,
bool  check_specification_or_abstract_origin = false 
) const

◆ GetDeclContextDIEs()

std::vector< DWARFDIE > DWARFDebugInfoEntry::GetDeclContextDIEs ( DWARFUnit cu) const

Definition at line 1291 of file DWARFDebugInfoEntry.cpp.

References DWARFDIE::GetDeclContextDIEs().

Referenced by GetFirstChild().

◆ GetDIENamesAndRanges()

bool DWARFDebugInfoEntry::GetDIENamesAndRanges ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
const char *&  name,
const char *&  mangled,
DWARFRangeList rangeList,
int &  decl_file,
int &  decl_line,
int &  decl_column,
int &  call_file,
int &  call_line,
int &  call_column,
lldb_private::DWARFExpression frame_base = NULL 
) const

◆ GetDWARFDeclContext()

void DWARFDebugInfoEntry::GetDWARFDeclContext ( SymbolFileDWARF dwarf2Data,
DWARFUnit cu,
DWARFDeclContext dwarf_decl_ctx 
) const

◆ GetFirstChild() [1/2]

DWARFDebugInfoEntry* DWARFDebugInfoEntry::GetFirstChild ( )
inline

Definition at line 212 of file DWARFDebugInfoEntry.h.

References HasChildren().

◆ GetFirstChild() [2/2]

const DWARFDebugInfoEntry* DWARFDebugInfoEntry::GetFirstChild ( ) const
inline

◆ GetMangledName()

const char * DWARFDebugInfoEntry::GetMangledName ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
bool  substitute_name_allowed = true 
) const

Definition at line 1029 of file DWARFDebugInfoEntry.cpp.

Referenced by operator bool().

◆ GetName() [1/2]

const char * DWARFDebugInfoEntry::GetName ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu 
) const

Definition at line 1019 of file DWARFDebugInfoEntry.cpp.

Referenced by operator bool().

◆ GetName() [2/2]

bool DWARFDebugInfoEntry::GetName ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
const dw_offset_t  die_offset,
lldb_private::Stream s 
)
static

◆ GetOffset()

dw_offset_t DWARFDebugInfoEntry::GetOffset ( ) const
inline

Definition at line 187 of file DWARFDebugInfoEntry.h.

References m_offset.

Referenced by CompareDIEOffset(), DWARFDIE::LookupDeepestBlock(), and OffsetLessThan().

◆ GetParent() [1/2]

DWARFDebugInfoEntry* DWARFDebugInfoEntry::GetParent ( )
inline

◆ GetParent() [2/2]

const DWARFDebugInfoEntry* DWARFDebugInfoEntry::GetParent ( ) const
inline

Definition at line 198 of file DWARFDebugInfoEntry.h.

References m_parent_idx.

◆ GetParentDeclContextDIE() [1/2]

DWARFDIE DWARFDebugInfoEntry::GetParentDeclContextDIE ( SymbolFileDWARF dwarf2Data,
DWARFUnit cu 
) const

Definition at line 1324 of file DWARFDebugInfoEntry.cpp.

Referenced by GetFirstChild().

◆ GetParentDeclContextDIE() [2/2]

DWARFDIE DWARFDebugInfoEntry::GetParentDeclContextDIE ( SymbolFileDWARF dwarf2Data,
DWARFUnit cu,
const DWARFAttributes attributes 
) const

◆ GetPubname()

const char * DWARFDebugInfoEntry::GetPubname ( SymbolFileDWARF dwarf2Data,
const DWARFUnit cu 
) const

Definition at line 1055 of file DWARFDebugInfoEntry.cpp.

Referenced by AppendTypeName(), and operator bool().

◆ GetQualifiedName() [1/2]

const char * DWARFDebugInfoEntry::GetQualifiedName ( SymbolFileDWARF dwarf2Data,
DWARFUnit cu,
std::string &  storage 
) const

Definition at line 1385 of file DWARFDebugInfoEntry.cpp.

Referenced by operator bool().

◆ GetQualifiedName() [2/2]

const char * DWARFDebugInfoEntry::GetQualifiedName ( SymbolFileDWARF dwarf2Data,
DWARFUnit cu,
const DWARFAttributes attributes,
std::string &  storage 
) const

◆ GetSibling() [1/2]

DWARFDebugInfoEntry* DWARFDebugInfoEntry::GetSibling ( )
inline

◆ GetSibling() [2/2]

const DWARFDebugInfoEntry* DWARFDebugInfoEntry::GetSibling ( ) const
inline

Definition at line 206 of file DWARFDebugInfoEntry.h.

References m_sibling_idx.

◆ HasChildren()

bool DWARFDebugInfoEntry::HasChildren ( ) const
inline

Definition at line 189 of file DWARFDebugInfoEntry.h.

References m_has_children.

Referenced by GetFirstChild(), and DWARFUnit::ScopedExtractDIEs::operator=().

◆ IsNULL()

bool DWARFDebugInfoEntry::IsNULL ( ) const
inline

Definition at line 185 of file DWARFDebugInfoEntry.h.

References m_abbr_idx.

Referenced by AppendTypeName(), GetName(), and DWARFUnit::ScopedExtractDIEs::operator=().

◆ LookupAddress()

bool DWARFDebugInfoEntry::LookupAddress ( const dw_addr_t  address,
SymbolFileDWARF dwarf2Data,
const DWARFUnit cu,
DWARFDebugInfoEntry **  function_die,
DWARFDebugInfoEntry **  block_die 
)

◆ MatchesDWARFDeclContext()

bool DWARFDebugInfoEntry::MatchesDWARFDeclContext ( SymbolFileDWARF dwarf2Data,
DWARFUnit cu,
const DWARFDeclContext dwarf_decl_ctx 
) const

Definition at line 1314 of file DWARFDebugInfoEntry.cpp.

Referenced by GetFirstChild().

◆ OffsetLessThan()

bool DWARFDebugInfoEntry::OffsetLessThan ( const DWARFDebugInfoEntry a,
const DWARFDebugInfoEntry b 
)
static

Definition at line 1722 of file DWARFDebugInfoEntry.cpp.

References GetOffset().

Referenced by operator bool().

◆ operator bool()

DWARFDebugInfoEntry::operator bool ( ) const
inlineexplicit

◆ operator!=()

bool DWARFDebugInfoEntry::operator!= ( const DWARFDebugInfoEntry rhs) const

Definition at line 1734 of file DWARFDebugInfoEntry.cpp.

Referenced by operator bool().

◆ operator==()

bool DWARFDebugInfoEntry::operator== ( const DWARFDebugInfoEntry rhs) const

Definition at line 1727 of file DWARFDebugInfoEntry.cpp.

References m_abbr_idx, m_has_children, m_offset, m_parent_idx, m_sibling_idx, and m_tag.

Referenced by operator bool().

◆ SetHasChildren()

void DWARFDebugInfoEntry::SetHasChildren ( bool  b)
inline

Definition at line 191 of file DWARFDebugInfoEntry.h.

References m_has_children.

Referenced by DWARFUnit::ScopedExtractDIEs::operator=().

◆ SetParent()

void DWARFDebugInfoEntry::SetParent ( DWARFDebugInfoEntry parent)
inline

Definition at line 234 of file DWARFDebugInfoEntry.h.

References m_parent_idx.

Referenced by SetSibling().

◆ SetParentIndex()

void DWARFDebugInfoEntry::SetParentIndex ( uint32_t  idx)
inline

Definition at line 254 of file DWARFDebugInfoEntry.h.

References m_parent_idx.

Referenced by DWARFUnit::ScopedExtractDIEs::operator=().

◆ SetSibling()

void DWARFDebugInfoEntry::SetSibling ( DWARFDebugInfoEntry sibling)
inline

Definition at line 242 of file DWARFDebugInfoEntry.h.

References GetParent(), m_sibling_idx, and SetParent().

◆ SetSiblingIndex()

void DWARFDebugInfoEntry::SetSiblingIndex ( uint32_t  idx)
inline

Definition at line 252 of file DWARFDebugInfoEntry.h.

References m_sibling_idx.

◆ Tag()

dw_tag_t DWARFDebugInfoEntry::Tag ( ) const
inline

Definition at line 183 of file DWARFDebugInfoEntry.h.

References m_tag.

Referenced by SymbolFileDWARF::GetTypeForDIE().

Member Data Documentation

◆ m_abbr_idx

uint16_t DWARFDebugInfoEntry::m_abbr_idx
protected

Definition at line 266 of file DWARFDebugInfoEntry.h.

Referenced by IsNULL(), and operator==().

◆ m_has_children

uint32_t DWARFDebugInfoEntry::m_has_children
protected

Definition at line 261 of file DWARFDebugInfoEntry.h.

Referenced by HasChildren(), operator==(), and SetHasChildren().

◆ m_offset

dw_offset_t DWARFDebugInfoEntry::m_offset
protected

Definition at line 258 of file DWARFDebugInfoEntry.h.

Referenced by GetOffset(), operator bool(), and operator==().

◆ m_parent_idx

uint32_t DWARFDebugInfoEntry::m_parent_idx
protected

Definition at line 259 of file DWARFDebugInfoEntry.h.

Referenced by GetParent(), operator==(), SetParent(), and SetParentIndex().

◆ m_sibling_idx

uint32_t DWARFDebugInfoEntry::m_sibling_idx
protected

Definition at line 261 of file DWARFDebugInfoEntry.h.

Referenced by GetSibling(), operator==(), SetSibling(), and SetSiblingIndex().

◆ m_tag

uint16_t DWARFDebugInfoEntry::m_tag
protected

Definition at line 267 of file DWARFDebugInfoEntry.h.

Referenced by operator==(), and Tag().


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