LLDB mainline
Classes | Public Member Functions | List of all members
lldb_private::plugin::dwarf::DWARFDIE Class Reference

#include <DWARFDIE.h>

Inheritance diagram for lldb_private::plugin::dwarf::DWARFDIE:
Inheritance graph
[legend]

Classes

class  child_iterator
 

Public Member Functions

bool IsStructUnionOrClass () const
 
bool IsMethod () const
 
const char * GetMangledName (bool substitute_name_allowed=true) const
 
const char * GetPubname () const
 
void GetName (Stream &s) const
 
void AppendTypeName (Stream &s) const
 
TypeResolveType () const
 
TypeResolveTypeUID (const DWARFDIE &die) const
 
DWARFDIE GetParent () const
 
DWARFDIE GetFirstChild () const
 
DWARFDIE GetSibling () const
 
DWARFDIE GetReferencedDIE (const dw_attr_t attr) const
 
DWARFDIE GetDIE (dw_offset_t die_offset) const
 
DWARFDIE LookupDeepestBlock (lldb::addr_t file_addr) const
 
DWARFDIE GetParentDeclContextDIE () const
 
std::vector< CompilerContextGetDeclContext () const
 Return this DIE's decl context as it is needed to look up types in Clang modules.
 
std::vector< CompilerContextGetTypeLookupContext () const
 Get a context to a type so it can be looked up.
 
DWARFDeclContext GetDWARFDeclContext () const
 
DWARFDIE GetAttributeValueAsReferenceDIE (const dw_attr_t attr) const
 
bool GetDIENamesAndRanges (const char *&name, const char *&mangled, llvm::DWARFAddressRangesVector &ranges, std::optional< int > &decl_file, std::optional< int > &decl_line, std::optional< int > &decl_column, std::optional< int > &call_file, std::optional< int > &call_line, std::optional< int > &call_column, DWARFExpressionList *frame_base) const
 
std::optional< uint64_t > getLanguage () const
 
DWARFDIE getParent () const
 
DWARFDIE resolveReferencedType (dw_attr_t attr) const
 
DWARFDIE resolveReferencedType (DWARFFormValue v) const
 
DWARFDIE resolveTypeUnitReference () const
 
std::optional< DWARFFormValuefind (const dw_attr_t attr) const
 
llvm::iterator_range< child_iteratorchildren () const
 The range of all the children of this DIE.
 
child_iterator begin () const
 
child_iterator end () const
 
 DWARFBaseDIE ()=default
 
 DWARFBaseDIE (DWARFUnit *cu, DWARFDebugInfoEntry *die)
 
 DWARFBaseDIE (const DWARFUnit *cu, DWARFDebugInfoEntry *die)
 
 DWARFBaseDIE (DWARFUnit *cu, const DWARFDebugInfoEntry *die)
 
 DWARFBaseDIE (const DWARFUnit *cu, const DWARFDebugInfoEntry *die)
 
const char * GetName () const
 
DWARFDebugInfoEntryGetDIE () const
 
- Public Member Functions inherited from lldb_private::plugin::dwarf::DWARFBaseDIE
 DWARFBaseDIE ()=default
 
 DWARFBaseDIE (DWARFUnit *cu, DWARFDebugInfoEntry *die)
 
 DWARFBaseDIE (const DWARFUnit *cu, DWARFDebugInfoEntry *die)
 
 DWARFBaseDIE (DWARFUnit *cu, const DWARFDebugInfoEntry *die)
 
 DWARFBaseDIE (const DWARFUnit *cu, const DWARFDebugInfoEntry *die)
 
 operator bool () const
 
bool IsValid () const
 
bool HasChildren () const
 
bool Supports_DW_AT_APPLE_objc_complete_type () const
 
SymbolFileDWARFGetDWARF () const
 
DWARFUnitGetCU () const
 
DWARFDebugInfoEntryGetDIE () const
 
std::optional< DIERefGetDIERef () const
 
void Set (DWARFUnit *cu, DWARFDebugInfoEntry *die)
 
void Clear ()
 
const DWARFDataExtractorGetData () const
 
dw_tag_t Tag () const
 
dw_offset_t GetOffset () const
 
lldb::user_id_t GetID () const
 
const char * GetName () const
 
lldb::ModuleSP GetModule () const
 
const char * GetAttributeValueAsString (const dw_attr_t attr, const char *fail_value) const
 
uint64_t GetAttributeValueAsUnsigned (const dw_attr_t attr, uint64_t fail_value) const
 
std::optional< uint64_t > GetAttributeValueAsOptionalUnsigned (const dw_attr_t attr) const
 
uint64_t GetAttributeValueAsAddress (const dw_attr_t attr, uint64_t fail_value) const
 
DWARFAttributes GetAttributes (Recurse recurse=Recurse::yes) const
 
dw_tag_t getTag () const
 
const char * getShortName () const
 

Additional Inherited Members

- Public Types inherited from lldb_private::plugin::dwarf::DWARFBaseDIE
enum class  Recurse : bool { no , yes }
 
using DWARFFormValue = dwarf::DWARFFormValue
 
- Protected Attributes inherited from lldb_private::plugin::dwarf::DWARFBaseDIE
DWARFUnitm_cu = nullptr
 
DWARFDebugInfoEntrym_die = nullptr
 

Detailed Description

Definition at line 19 of file DWARFDIE.h.

Member Function Documentation

◆ AppendTypeName()

void DWARFDIE::AppendTypeName ( Stream s) const

◆ begin()

DWARFDIE::child_iterator DWARFDIE::begin ( ) const

Definition at line 590 of file DWARFDIE.cpp.

◆ children()

llvm::iterator_range< DWARFDIE::child_iterator > DWARFDIE::children ( ) const

◆ DWARFBaseDIE() [1/5]

lldb_private::plugin::dwarf::DWARFBaseDIE::DWARFBaseDIE ( )
default

◆ DWARFBaseDIE() [2/5]

lldb_private::plugin::dwarf::DWARFBaseDIE::DWARFBaseDIE ( const DWARFUnit cu,
const DWARFDebugInfoEntry die 
)
inline

Definition at line 43 of file DWARFBaseDIE.h.

◆ DWARFBaseDIE() [3/5]

lldb_private::plugin::dwarf::DWARFBaseDIE::DWARFBaseDIE ( const DWARFUnit cu,
DWARFDebugInfoEntry die 
)
inline

Definition at line 37 of file DWARFBaseDIE.h.

◆ DWARFBaseDIE() [4/5]

lldb_private::plugin::dwarf::DWARFBaseDIE::DWARFBaseDIE ( DWARFUnit cu,
const DWARFDebugInfoEntry die 
)
inline

Definition at line 40 of file DWARFBaseDIE.h.

◆ DWARFBaseDIE() [5/5]

lldb_private::plugin::dwarf::DWARFBaseDIE::DWARFBaseDIE ( DWARFUnit cu,
DWARFDebugInfoEntry die 
)
inline

Definition at line 34 of file DWARFBaseDIE.h.

◆ end()

DWARFDIE::child_iterator DWARFDIE::end ( ) const

Definition at line 594 of file DWARFDIE.cpp.

◆ find()

std::optional< DWARFFormValue > DWARFDIE::find ( const dw_attr_t  attr) const

◆ GetAttributeValueAsReferenceDIE()

DWARFDIE DWARFDIE::GetAttributeValueAsReferenceDIE ( const dw_attr_t  attr) const

◆ GetDeclContext()

std::vector< CompilerContext > DWARFDIE::GetDeclContext ( ) const

Return this DIE's decl context as it is needed to look up types in Clang modules.

This context will include any modules or functions that the type is declared in so an exact module match can be efficiently made.

Definition at line 428 of file DWARFDIE.cpp.

References GetDeclContextImpl().

Referenced by DWARFASTParserClang::ParseTypeFromClangModule(), and lldb_private::plugin::dwarf::DWARFIndex::ProcessTypeDIEMatchQuery().

◆ GetDIE() [1/2]

DWARFDebugInfoEntry * lldb_private::plugin::dwarf::DWARFBaseDIE::GetDIE ( ) const
inline

Definition at line 61 of file DWARFBaseDIE.h.

Referenced by AppendTypeName(), and GetName().

◆ GetDIE() [2/2]

DWARFDIE DWARFDIE::GetDIE ( dw_offset_t  die_offset) const

Definition at line 124 of file DWARFDIE.cpp.

References lldb_private::plugin::dwarf::DWARFUnit::GetDIE(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), and lldb_private::plugin::dwarf::DWARFBaseDIE::m_cu.

Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::CompleteType(), DWARFASTParserClang::CopyUniqueClassMethodTypes(), lldb_private::plugin::dwarf::SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE(), lldb_private::plugin::dwarf::SymbolFileDWARF::FindFunctions(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributes(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValue(), DWARFASTParserClang::GetCachedClangDeclContextForDIE(), DWARFASTParserClang::GetClangDeclForDIE(), lldb_private::plugin::dwarf::DWARFDebugInfo::GetDIE(), lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetFunctions(), DWARFASTParserClang::GetOwningClangModule(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetTypeForDIE(), DWARFASTParserClang::LinkDeclContextToDIE(), lldb_private::plugin::dwarf::DWARFIndex::DIERefCallbackImpl::operator()(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseAndAppendGlobalVariable(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), DWARFASTParserClang::ParseCXXMethod(), DWARFASTParserClang::ParseEnum(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseFunction(), DWARFASTParserClang::ParseFunctionFromDWARF(), DWARFASTParserClang::ParseStructureLikeDIE(), DWARFASTParserClang::ParseTypeFromDWARF(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariableDIE(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariableDIECached(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesForContext(), DWARFASTParserClang::ResolveBlockDIE(), DWARFASTParserClang::ResolveImportedDeclarationDIE(), and DWARFASTParserClang::ResolveNamespaceDIE().

◆ GetDIENamesAndRanges()

bool DWARFDIE::GetDIENamesAndRanges ( const char *&  name,
const char *&  mangled,
llvm::DWARFAddressRangesVector &  ranges,
std::optional< int > &  decl_file,
std::optional< int > &  decl_line,
std::optional< int > &  decl_column,
std::optional< int > &  call_file,
std::optional< int > &  call_line,
std::optional< int > &  call_column,
lldb_private::DWARFExpressionList frame_base 
) const

◆ GetDWARFDeclContext()

DWARFDeclContext DWARFDIE::GetDWARFDeclContext ( ) const

◆ GetFirstChild()

DWARFDIE DWARFDIE::GetFirstChild ( ) const

◆ getLanguage()

std::optional< uint64_t > DWARFDIE::getLanguage ( ) const

◆ GetMangledName()

const char * DWARFDIE::GetMangledName ( bool  substitute_name_allowed = true) const

◆ GetName() [1/2]

const char * DWARFBaseDIE::GetName ( ) const

Definition at line 98 of file DWARFBaseDIE.cpp.

◆ GetName() [2/2]

void DWARFDIE::GetName ( Stream s) const

◆ GetParent()

DWARFDIE DWARFDIE::GetParent ( ) const

◆ getParent()

DWARFDIE lldb_private::plugin::dwarf::DWARFDIE::getParent ( ) const
inline

Definition at line 111 of file DWARFDIE.h.

References GetParent().

◆ GetParentDeclContextDIE()

DWARFDIE DWARFDIE::GetParentDeclContextDIE ( ) const

◆ GetPubname()

const char * DWARFDIE::GetPubname ( ) const

◆ GetReferencedDIE()

DWARFDIE DWARFDIE::GetReferencedDIE ( const dw_attr_t  attr) const

◆ GetSibling()

DWARFDIE DWARFDIE::GetSibling ( ) const

◆ GetTypeLookupContext()

std::vector< CompilerContext > DWARFDIE::GetTypeLookupContext ( ) const

Get a context to a type so it can be looked up.

This function uses the current DIE to fill in a CompilerContext array that is suitable for type lookup for comparison to a TypeQuery's compiler context (TypeQuery::GetContextRef()). If this DIE represents a named type, it should fill out the compiler context with the type itself as the last entry. The declaration context should be above the type and stop at an appropriate time, like either the translation unit or at a function context. This is designed to allow users to efficiently look for types using a full or partial CompilerContext array.

Definition at line 488 of file DWARFDIE.cpp.

References GetTypeLookupContextImpl().

Referenced by lldb_private::plugin::dwarf::DWARFIndex::ProcessTypeDIEMatchQuery().

◆ IsMethod()

bool DWARFDIE::IsMethod ( ) const

◆ IsStructUnionOrClass()

bool DWARFDIE::IsStructUnionOrClass ( ) const

◆ LookupDeepestBlock()

DWARFDIE DWARFDIE::LookupDeepestBlock ( lldb::addr_t  file_addr) const

◆ resolveReferencedType() [1/2]

DWARFDIE DWARFDIE::resolveReferencedType ( dw_attr_t  attr) const

Definition at line 609 of file DWARFDIE.cpp.

References GetReferencedDIE().

◆ resolveReferencedType() [2/2]

DWARFDIE DWARFDIE::resolveReferencedType ( DWARFFormValue  v) const

◆ ResolveType()

lldb_private::Type * DWARFDIE::ResolveType ( ) const

◆ ResolveTypeUID()

lldb_private::Type * DWARFDIE::ResolveTypeUID ( const DWARFDIE die) const

◆ resolveTypeUnitReference()

DWARFDIE DWARFDIE::resolveTypeUnitReference ( ) const

Definition at line 619 of file DWARFDIE.cpp.

References GetReferencedDIE().


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