LLDB mainline
|
#include <DebugNamesDWARFIndex.h>
Public Member Functions | |
void | Preload () override |
void | GetGlobalVariables (ConstString basename, llvm::function_ref< bool(DWARFDIE die)> callback) override |
Finds global variables with the given base name. | |
void | GetGlobalVariables (const RegularExpression ®ex, llvm::function_ref< bool(DWARFDIE die)> callback) override |
void | GetGlobalVariables (DWARFUnit &cu, llvm::function_ref< bool(DWARFDIE die)> callback) override |
cu must be the skeleton unit if possible, not GetNonSkeletonUnit(). | |
void | GetObjCMethods (ConstString class_name, llvm::function_ref< bool(DWARFDIE die)> callback) override |
void | GetCompleteObjCClass (ConstString class_name, bool must_be_implementation, llvm::function_ref< bool(DWARFDIE die)> callback) override |
void | GetFullyQualifiedType (const DWARFDeclContext &context, llvm::function_ref< bool(DWARFDIE die)> callback) override |
Uses DWARF5's IDX_parent fields, when available, to speed up this query. | |
void | GetTypes (ConstString name, llvm::function_ref< bool(DWARFDIE die)> callback) override |
void | GetTypes (const DWARFDeclContext &context, llvm::function_ref< bool(DWARFDIE die)> callback) override |
void | GetNamespaces (ConstString name, llvm::function_ref< bool(DWARFDIE die)> callback) override |
void | GetFunctions (const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< bool(DWARFDIE die)> callback) override |
void | GetFunctions (const RegularExpression ®ex, llvm::function_ref< bool(DWARFDIE die)> callback) override |
void | Dump (Stream &s) override |
Public Member Functions inherited from lldb_private::plugin::dwarf::DWARFIndex | |
DWARFIndex (Module &module) | |
virtual | ~DWARFIndex () |
virtual void | Preload ()=0 |
virtual void | GetGlobalVariables (ConstString basename, llvm::function_ref< bool(DWARFDIE die)> callback)=0 |
Finds global variables with the given base name. | |
virtual void | GetGlobalVariables (const RegularExpression ®ex, llvm::function_ref< bool(DWARFDIE die)> callback)=0 |
virtual void | GetGlobalVariables (DWARFUnit &cu, llvm::function_ref< bool(DWARFDIE die)> callback)=0 |
cu must be the skeleton unit if possible, not GetNonSkeletonUnit(). | |
virtual void | GetObjCMethods (ConstString class_name, llvm::function_ref< bool(DWARFDIE die)> callback)=0 |
virtual void | GetCompleteObjCClass (ConstString class_name, bool must_be_implementation, llvm::function_ref< bool(DWARFDIE die)> callback)=0 |
virtual void | GetTypes (ConstString name, llvm::function_ref< bool(DWARFDIE die)> callback)=0 |
virtual void | GetTypes (const DWARFDeclContext &context, llvm::function_ref< bool(DWARFDIE die)> callback)=0 |
virtual void | GetFullyQualifiedType (const DWARFDeclContext &context, llvm::function_ref< bool(DWARFDIE die)> callback) |
Finds all DIEs whose fully qualified name matches context . | |
virtual void | GetNamespaces (ConstString name, llvm::function_ref< bool(DWARFDIE die)> callback)=0 |
virtual void | GetFunctions (const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< bool(DWARFDIE die)> callback)=0 |
virtual void | GetFunctions (const RegularExpression ®ex, llvm::function_ref< bool(DWARFDIE die)> callback)=0 |
virtual void | Dump (Stream &s)=0 |
StatsDuration::Duration | GetIndexTime () |
Static Public Member Functions | |
static llvm::Expected< std::unique_ptr< DebugNamesDWARFIndex > > | Create (Module &module, DWARFDataExtractor debug_names, DWARFDataExtractor debug_str, SymbolFileDWARF &dwarf) |
Private Types | |
using | DebugNames = llvm::DWARFDebugNames |
Private Member Functions | |
DebugNamesDWARFIndex (Module &module, std::unique_ptr< llvm::DWARFDebugNames > debug_names_up, DWARFDataExtractor debug_names_data, DWARFDataExtractor debug_str_data, SymbolFileDWARF &dwarf) | |
std::optional< DIERef > | ToDIERef (const DebugNames::Entry &entry) const |
bool | ProcessEntry (const DebugNames::Entry &entry, llvm::function_ref< bool(DWARFDIE die)> callback) |
bool | SameParentChain (llvm::ArrayRef< llvm::StringRef > parent_names, llvm::ArrayRef< DebugNames::Entry > parent_entries) const |
Returns true if parent_entries have identical names to parent_names . | |
Static Private Member Functions | |
static void | MaybeLogLookupError (llvm::Error error, const DebugNames::NameIndex &ni, llvm::StringRef name) |
static llvm::DenseSet< dw_offset_t > | GetUnits (const DebugNames &debug_names) |
Private Attributes | |
DWARFDebugInfo & | m_debug_info |
DWARFDataExtractor | m_debug_names_data |
DWARFDataExtractor | m_debug_str_data |
std::unique_ptr< DebugNames > | m_debug_names_up |
ManualDWARFIndex | m_fallback |
Additional Inherited Members | |
Protected Member Functions inherited from lldb_private::plugin::dwarf::DWARFIndex | |
bool | ProcessFunctionDIE (const Module::LookupInfo &lookup_info, DIERef ref, SymbolFileDWARF &dwarf, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< bool(DWARFDIE die)> callback) |
Helper function implementing common logic for processing function dies. | |
DIERefCallbackImpl | DIERefCallback (llvm::function_ref< bool(DWARFDIE die)> callback, llvm::StringRef name={}) const |
void | ReportInvalidDIERef (DIERef ref, llvm::StringRef name) const |
bool | GetFullyQualifiedTypeImpl (const DWARFDeclContext &context, DWARFDIE die, llvm::function_ref< bool(DWARFDIE die)> callback) |
Implementation of GetFullyQualifiedType to check a single entry, shareable with derived classes. | |
Protected Attributes inherited from lldb_private::plugin::dwarf::DWARFIndex | |
Module & | m_module |
StatsDuration | m_index_time |
Definition at line 22 of file DebugNamesDWARFIndex.h.
|
private |
Definition at line 83 of file DebugNamesDWARFIndex.h.
|
inlineprivate |
Definition at line 66 of file DebugNamesDWARFIndex.h.
|
static |
Definition at line 25 of file DebugNamesDWARFIndex.cpp.
References lldb_private::DWARFDataExtractor::GetAsLLVM(), and lldb_private::DWARFDataExtractor::GetAsLLVMDWARF().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::InitializeObject().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 417 of file DebugNamesDWARFIndex.cpp.
References lldb_private::plugin::dwarf::ManualDWARFIndex::Dump(), m_debug_names_up, m_fallback, and lldb_private::Stream::PutCString().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 177 of file DebugNamesDWARFIndex.cpp.
References lldb_private::plugin::dwarf::DWARFIndex::DIERefCallback(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetAttributeValueAsUnsigned(), lldb_private::plugin::dwarf::ManualDWARFIndex::GetCompleteObjCClass(), lldb_private::plugin::dwarf::DWARFDebugInfo::GetDIE(), lldb_private::ConstString::GetStringRef(), lldb_private::plugin::dwarf::DWARFDebugInfo::GetUnit(), m_debug_info, m_debug_names_up, m_fallback, lldb_private::plugin::dwarf::DWARFIndex::ReportInvalidDIERef(), lldb_private::plugin::dwarf::DWARFUnit::Supports_DW_AT_APPLE_objc_complete_type(), and ToDIERef().
|
overridevirtual |
Uses DWARF5's IDX_parent fields, when available, to speed up this query.
Reimplemented from lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 259 of file DebugNamesDWARFIndex.cpp.
References lldb_private::plugin::dwarf::DWARFIndex::GetFullyQualifiedTypeImpl(), lldb_private::plugin::dwarf::DWARFDeclContext::GetSize(), m_debug_names_up, ProcessEntry(), and SameParentChain().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 366 of file DebugNamesDWARFIndex.cpp.
References lldb_private::plugin::dwarf::DWARFDIE::GetDIE(), lldb_private::plugin::dwarf::ManualDWARFIndex::GetFunctions(), lldb_private::Module::LookupInfo::GetLookupName(), lldb_private::ConstString::GetStringRef(), m_debug_names_up, m_fallback, lldb_private::plugin::dwarf::DWARFIndex::ProcessFunctionDIE(), and ToDIERef().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 392 of file DebugNamesDWARFIndex.cpp.
References lldb_private::RegularExpression::Execute(), lldb_private::plugin::dwarf::ManualDWARFIndex::GetFunctions(), m_debug_names_up, m_fallback, MaybeLogLookupError(), and ProcessEntry().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 114 of file DebugNamesDWARFIndex.cpp.
References lldb_private::plugin::dwarf::ManualDWARFIndex::GetGlobalVariables(), m_debug_names_up, m_fallback, MaybeLogLookupError(), lldb_private::Mangled::NameMatches(), and ProcessEntry().
|
overridevirtual |
Finds global variables with the given base name.
Any additional filtering (e.g., to only retrieve variables from a given context) should be done by the consumer.
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 100 of file DebugNamesDWARFIndex.cpp.
References lldb_private::plugin::dwarf::ManualDWARFIndex::GetGlobalVariables(), lldb_private::ConstString::GetStringRef(), m_debug_names_up, m_fallback, and ProcessEntry().
|
overridevirtual |
cu must be the skeleton unit if possible, not GetNonSkeletonUnit().
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 139 of file DebugNamesDWARFIndex.cpp.
References lldb_private::plugin::dwarf::ManualDWARFIndex::GetGlobalVariables(), lldb_private::plugin::dwarf::DWARFUnit::GetOffset(), m_debug_names_up, m_fallback, MaybeLogLookupError(), and ProcessEntry().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 351 of file DebugNamesDWARFIndex.cpp.
References lldb_private::plugin::dwarf::ManualDWARFIndex::GetNamespaces(), lldb_private::ConstString::GetStringRef(), m_debug_names_up, m_fallback, and ProcessEntry().
|
inlineoverridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 40 of file DebugNamesDWARFIndex.h.
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 337 of file DebugNamesDWARFIndex.cpp.
References lldb_private::plugin::dwarf::ManualDWARFIndex::GetTypes(), m_debug_names_up, m_fallback, and ProcessEntry().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 324 of file DebugNamesDWARFIndex.cpp.
References lldb_private::ConstString::GetStringRef(), lldb_private::plugin::dwarf::ManualDWARFIndex::GetTypes(), m_debug_names_up, m_fallback, and ProcessEntry().
|
staticprivate |
Definition at line 38 of file DebugNamesDWARFIndex.cpp.
|
staticprivate |
Definition at line 89 of file DebugNamesDWARFIndex.cpp.
References error(), lldb_private::GetLog(), LLDB_LOG_ERROR, and lldb_private::Lookups.
Referenced by GetFunctions(), and GetGlobalVariables().
|
inlineoverridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 28 of file DebugNamesDWARFIndex.h.
References m_fallback, and lldb_private::plugin::dwarf::ManualDWARFIndex::Preload().
|
private |
Definition at line 75 of file DebugNamesDWARFIndex.cpp.
References lldb_private::SymbolFile::GetBackingSymbolFile(), lldb_private::Module::GetSymbolFile(), lldb_private::plugin::dwarf::DWARFIndex::m_module, and ToDIERef().
Referenced by GetFullyQualifiedType(), GetFunctions(), GetGlobalVariables(), GetNamespaces(), and GetTypes().
|
private |
Returns true if parent_entries
have identical names to parent_names
.
Definition at line 296 of file DebugNamesDWARFIndex.cpp.
References m_debug_info, lldb_private::plugin::dwarf::DWARFDebugInfo::PeekDIEName(), and ToDIERef().
Referenced by GetFullyQualifiedType().
|
private |
Definition at line 52 of file DebugNamesDWARFIndex.cpp.
References lldb_private::plugin::dwarf::DIERef::DebugInfo, lldb_private::plugin::dwarf::SymbolFileDWARF::GetFileIndex(), lldb_private::plugin::dwarf::DWARFUnit::GetNonSkeletonUnit(), lldb_private::plugin::dwarf::DWARFUnit::GetOffset(), lldb_private::plugin::dwarf::DWARFUnit::GetSymbolFileDWARF(), lldb_private::plugin::dwarf::DWARFDebugInfo::GetUnitAtOffset(), and m_debug_info.
Referenced by GetCompleteObjCClass(), GetFunctions(), ProcessEntry(), and SameParentChain().
|
private |
Definition at line 76 of file DebugNamesDWARFIndex.h.
Referenced by GetCompleteObjCClass(), SameParentChain(), and ToDIERef().
|
private |
Definition at line 80 of file DebugNamesDWARFIndex.h.
|
private |
Definition at line 84 of file DebugNamesDWARFIndex.h.
Referenced by Dump(), GetCompleteObjCClass(), GetFullyQualifiedType(), GetFunctions(), GetGlobalVariables(), GetNamespaces(), and GetTypes().
|
private |
Definition at line 81 of file DebugNamesDWARFIndex.h.
|
private |
Definition at line 85 of file DebugNamesDWARFIndex.h.
Referenced by Dump(), GetCompleteObjCClass(), GetFunctions(), GetGlobalVariables(), GetNamespaces(), GetTypes(), and Preload().