LLDB mainline
|
#include <DWARFDIE.h>
Classes | |
class | child_iterator |
Public Member Functions | |
bool | IsStructUnionOrClass () const |
bool | IsMethod () const |
const char * | GetMangledName () const |
const char * | GetPubname () const |
void | GetName (Stream &s) const |
void | AppendTypeName (Stream &s) const |
Type * | ResolveType () const |
Type * | ResolveTypeUID (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< DWARFDIE > | GetDeclContextDIEs () const |
std::vector< CompilerContext > | GetDeclContext () const |
Return this DIE's decl context as it is needed to look up types in Clang modules. | |
std::vector< CompilerContext > | GetTypeLookupContext () const |
Get a context to a type so it can be looked up. | |
DWARFDIE | GetAttributeValueAsReferenceDIE (const dw_attr_t attr) const |
bool | GetDIENamesAndRanges (const char *&name, const char *&mangled, DWARFRangeList &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 |
llvm::iterator_range< child_iterator > | children () const |
The range of all the children of this DIE. | |
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 |
DWARFDebugInfoEntry * | GetDIE () 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 |
SymbolFileDWARF * | GetDWARF () const |
DWARFUnit * | GetCU () const |
DWARFDebugInfoEntry * | GetDIE () const |
std::optional< DIERef > | GetDIERef () const |
void | Set (DWARFUnit *cu, DWARFDebugInfoEntry *die) |
void | Clear () |
const DWARFDataExtractor & | GetData () const |
dw_tag_t | Tag () const |
const char * | GetTagAsCString () 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 |
Additional Inherited Members | |
Public Types inherited from lldb_private::plugin::dwarf::DWARFBaseDIE | |
enum class | Recurse : bool { no , yes } |
Protected Attributes inherited from lldb_private::plugin::dwarf::DWARFBaseDIE | |
DWARFUnit * | m_cu = nullptr |
DWARFDebugInfoEntry * | m_die = nullptr |
Definition at line 18 of file DWARFDIE.h.
void DWARFDIE::AppendTypeName | ( | Stream & | s | ) | const |
Definition at line 236 of file DWARFDIE.cpp.
References GetAttributeValueAsReferenceDIE(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetAttributeValueAsUnsigned(), GetDIE(), GetPubname(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), lldb_private::Stream::PutCString(), and lldb_private::plugin::dwarf::DWARFBaseDIE::Tag().
llvm::iterator_range< DWARFDIE::child_iterator > DWARFDIE::children | ( | ) | const |
The range of all the children of this DIE.
Definition at line 522 of file DWARFDIE.cpp.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::ClassOrStructIsVirtual(), lldb_private::plugin::dwarf::SymbolFileDWARF::CollectCallEdges(), CollectCallSiteParameters(), DWARFASTParserClang::EnsureAllDIEsInDeclContextHaveBeenParsed(), FindAnyChildWithAbstractOrigin(), lldb_private::plugin::dwarf::SymbolFileDWARF::FindBlockContainingSpecification(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetTypes(), LookupDeepestBlock(), lldb_private::plugin::dwarf::DWARFASTParser::ParseChildArrayInfo(), DWARFASTParserClang::ParseChildEnumerators(), DWARFASTParserClang::ParseChildMembers(), DWARFASTParserClang::ParseChildParameters(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseImportedModules(), DWARFASTParserClang::ParseTemplateDIE(), DWARFASTParserClang::ParseTemplateParameterInfos(), and DWARFASTParserClang::ParseTypeModifier().
|
default |
|
inline |
Definition at line 41 of file DWARFBaseDIE.h.
|
inline |
Definition at line 35 of file DWARFBaseDIE.h.
|
inline |
Definition at line 38 of file DWARFBaseDIE.h.
|
inline |
Definition at line 32 of file DWARFBaseDIE.h.
Definition at line 127 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValue(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetCU(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), lldb_private::plugin::dwarf::DWARFBaseDIE::m_die, and lldb_private::plugin::dwarf::DWARFFormValue::Reference().
Referenced by AppendTypeName(), DWARFASTParserClang::GetClangDeclForDIE(), and DWARFASTParserClang::ResolveImportedDeclarationDIE().
std::vector< lldb_private::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 434 of file DWARFDIE.cpp.
References GetDeclContextImpl().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::FindTypes(), and DWARFASTParserClang::ParseTypeFromClangModule().
std::vector< DWARFDIE > DWARFDIE::GetDeclContextDIEs | ( | ) | const |
Definition at line 368 of file DWARFDIE.cpp.
References GetDIE(), GetParentDeclContextDIE(), and lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::DIEDeclContextsMatch().
|
inline |
Definition at line 59 of file DWARFBaseDIE.h.
Referenced by AppendTypeName(), GetDeclContextDIEs(), and GetName().
DWARFDIE DWARFDIE::GetDIE | ( | dw_offset_t | die_offset | ) | const |
Definition at line 119 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(), GetDeclContextDIEs(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDWARFDeclContext(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetDWARFDeclContextStatic(), lldb_private::plugin::dwarf::DWARFIndex::GetFullyQualifiedTypeImpl(), lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetFunctions(), DWARFASTParserClang::GetOwningClangModule(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetParentDeclContextDIE(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetTypeForDIE(), DWARFASTParserClang::LinkDeclContextToDIE(), lldb_private::plugin::dwarf::DWARFIndex::DIERefCallbackImpl::operator()(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseAndAppendGlobalVariable(), DWARFASTParserClang::ParseEnum(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseFunction(), DWARFASTParserClang::ParseFunctionFromDWARF(), DWARFASTParserClang::ParseStructureLikeDIE(), DWARFASTParserClang::ParseSubroutine(), DWARFASTParserClang::ParseTypeFromClangModule(), DWARFASTParserClang::ParseTypeFromDWARF(), DWARFASTParserClang::ParseTypeModifier(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariableDIE(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariableDIECached(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesForContext(), DWARFASTParserClang::ResolveBlockDIE(), DWARFASTParserClang::ResolveImportedDeclarationDIE(), DWARFASTParserClang::ResolveNamespaceDIE(), and DWARFASTParserClang::UpdateSymbolContextScopeForType().
bool DWARFDIE::GetDIENamesAndRanges | ( | const char *& | name, |
const char *& | mangled, | ||
DWARFRangeList & | 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 |
Definition at line 508 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFBaseDIE::GetCU(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetDIENamesAndRanges(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), and lldb_private::plugin::dwarf::DWARFBaseDIE::m_die.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), and DWARFASTParserClang::ParseFunctionFromDWARF().
DWARFDIE DWARFDIE::GetFirstChild | ( | ) | const |
Definition at line 95 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetFirstChild(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), lldb_private::plugin::dwarf::DWARFBaseDIE::m_cu, and lldb_private::plugin::dwarf::DWARFBaseDIE::m_die.
Referenced by DWARFASTParserClang::CopyUniqueClassMethodTypes(), lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::MergeBlockAbstractParameters(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseTypes(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesInFunctionContextRecursive().
const char * DWARFDIE::GetMangledName | ( | ) | const |
Definition at line 199 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetMangledName(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), lldb_private::plugin::dwarf::DWARFBaseDIE::m_cu, and lldb_private::plugin::dwarf::DWARFBaseDIE::m_die.
Referenced by DWARFASTParserClang::CopyUniqueClassMethodTypes(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetMangledNamesForFunction(), and lldb_private::plugin::dwarf::DWARFIndex::ProcessFunctionDIE().
const char * DWARFBaseDIE::GetName | ( | ) | const |
Definition at line 98 of file DWARFBaseDIE.cpp.
Referenced by GetTypeLookupContext().
void DWARFDIE::GetName | ( | Stream & | s | ) | const |
Definition at line 218 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValueAsString(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetCU(), GetDIE(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), and lldb_private::Stream::PutCString().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::DIEDeclContextsMatch(), lldb_private::plugin::dwarf::UniqueDWARFASTTypeList::Find(), lldb_private::plugin::dwarf::SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(), DWARFASTParserClang::GetClangDeclForDIE(), GetContainingClangModule(), DWARFASTParserClang::GetCPlusPlusQualifiedName(), GetDeclContextImpl(), DWARFASTParserClang::GetDIEClassTemplateParams(), DWARFASTParserClang::ParseSubroutine(), DWARFASTParserClang::ParseTemplateDIE(), DWARFASTParserClang::ParseTypeFromDWARF(), DWARFASTParserClang::ParseTypeModifier(), lldb_private::plugin::dwarf::DWARFIndex::ProcessFunctionDIE(), DWARFASTParserClang::ResolveNamespaceDIE(), lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveType(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveTypeUID().
DWARFDIE DWARFDIE::GetParent | ( | ) | const |
Definition at line 87 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetParent(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), lldb_private::plugin::dwarf::DWARFBaseDIE::m_cu, and lldb_private::plugin::dwarf::DWARFBaseDIE::m_die.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::DIEInDeclContext(), lldb_private::plugin::dwarf::UniqueDWARFASTTypeList::Find(), FindFirstChildWithAbstractOrigin(), DWARFASTParserClang::GetClangDeclForDIE(), GetContainingClangModuleDIE(), GetContainingFunctionWithAbstractOrigin(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDeclContextDIEContainingDIE(), GetDeclContextImpl(), DWARFASTParserClang::GetOwningClangModule(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetParentDeclContextDIE(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetParentSymbolContextDIE(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetTypeForDIE(), GetTypeLookupContext(), IsClangModuleFwdDecl(), DWARFASTParserClang::ParseFunctionFromDWARF(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseImportedModules(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunction().
DWARFDIE DWARFDIE::GetParentDeclContextDIE | ( | ) | const |
Definition at line 488 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetParentDeclContextDIE(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), lldb_private::plugin::dwarf::DWARFBaseDIE::m_cu, and lldb_private::plugin::dwarf::DWARFBaseDIE::m_die.
Referenced by DWARFASTParserClang::GetCPlusPlusQualifiedName(), GetDeclContextDIEs(), and lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetParentDeclContextDIE().
const char * DWARFDIE::GetPubname | ( | ) | const |
Definition at line 206 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetPubname(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), lldb_private::plugin::dwarf::DWARFBaseDIE::m_cu, and lldb_private::plugin::dwarf::DWARFBaseDIE::m_die.
Referenced by AppendTypeName(), lldb_private::plugin::dwarf::SymbolFileDWARF::CollectCallEdges(), GetDeclContextImpl(), and GetTypeLookupContext().
Definition at line 111 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeValueAsReference(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetCU(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), and lldb_private::plugin::dwarf::DWARFBaseDIE::m_die.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::FindBlockContainingSpecification(), DWARFASTParserClang::GetClangDeclForDIE(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDeclContextDIEContainingDIE(), GetDeclContextImpl(), lldb_private::plugin::dwarf::SymbolFileDWARF::MergeBlockAbstractParameters(), lldb_private::plugin::dwarf::DWARFASTParser::ParseChildArrayInfo(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseImportedModules(), DWARFASTParserClang::ParseTypeModifier(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariableDIECached().
DWARFDIE DWARFDIE::GetSibling | ( | ) | const |
Definition at line 103 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetSibling(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), lldb_private::plugin::dwarf::DWARFBaseDIE::m_cu, and lldb_private::plugin::dwarf::DWARFBaseDIE::m_die.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::MergeBlockAbstractParameters(), lldb_private::plugin::dwarf::DWARFDIE::child_iterator::operator++(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseTypes(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesInFunctionContextRecursive().
std::vector< lldb_private::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 440 of file DWARFDIE.cpp.
References lldb_private::Builtin, lldb_private::Class, lldb_private::Enum, GetName(), GetParent(), GetPubname(), GetTypeLookupContext(), lldb_private::Namespace, lldb_private::Struct, lldb_private::plugin::dwarf::DWARFBaseDIE::Tag(), lldb_private::Typedef, lldb_private::Union, and lldb_private::Variable.
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::FindTypes(), and GetTypeLookupContext().
bool DWARFDIE::IsMethod | ( | ) | const |
Definition at line 501 of file DWARFDIE.cpp.
Referenced by lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnitImpl(), and lldb_private::plugin::dwarf::DWARFIndex::ProcessFunctionDIE().
bool DWARFDIE::IsStructUnionOrClass | ( | ) | const |
Definition at line 495 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFBaseDIE::Tag().
DWARFDIE DWARFDIE::LookupDeepestBlock | ( | lldb::addr_t | file_addr | ) | const |
Definition at line 140 of file DWARFDIE.cpp.
References children(), lldb_private::RangeVector< B, S, N >::FindEntryThatContains(), lldb_private::plugin::dwarf::DWARFDebugInfoEntry::GetAttributeAddressRanges(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), LookupDeepestBlock(), lldb_private::plugin::dwarf::DWARFBaseDIE::m_cu, lldb_private::plugin::dwarf::DWARFBaseDIE::m_die, and lldb_private::plugin::dwarf::DWARFBaseDIE::Tag().
Referenced by LookupDeepestBlock(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunctionAndBlock().
lldb_private::Type * DWARFDIE::ResolveType | ( | ) | const |
Definition at line 355 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFBaseDIE::GetDWARF(), lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid(), and lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveType().
Referenced by DWARFASTParserClang::CompleteRecordType().
lldb_private::Type * DWARFDIE::ResolveTypeUID | ( | const DWARFDIE & | die | ) | const |
Definition at line 362 of file DWARFDIE.cpp.
References lldb_private::plugin::dwarf::DWARFBaseDIE::GetDWARF().
Referenced by DWARFASTParserClang::CreateStaticMemberVariable(), DWARFASTParserClang::ParseChildParameters(), DWARFASTParserClang::ParseInheritance(), DWARFASTParserClang::ParseObjCProperty(), DWARFASTParserClang::ParseRustVariantPart(), DWARFASTParserClang::ParseSingleMember(), and DWARFASTParserClang::ParseTemplateDIE().