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 | 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 |
![]() | |
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 | 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) |
bool | ProcessEntry (const DebugNames::Entry &entry, llvm::function_ref< bool(DWARFDIE die)> callback, llvm::StringRef name) |
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 | |
![]() | |
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 |
![]() | |
Module & | m_module |
StatsDuration | m_index_time |
Definition at line 21 of file DebugNamesDWARFIndex.h.
|
private |
Definition at line 77 of file DebugNamesDWARFIndex.h.
|
inlineprivate |
Definition at line 60 of file DebugNamesDWARFIndex.h.
|
static |
Definition at line 23 of file DebugNamesDWARFIndex.cpp.
References lldb_private::DWARFDataExtractor::GetAsLLVM().
Referenced by SymbolFileDWARF::InitializeObject().
|
overridevirtual |
Implements lldb_private::DWARFIndex.
Definition at line 293 of file DebugNamesDWARFIndex.cpp.
References lldb_private::ManualDWARFIndex::Dump(), m_debug_names_up, m_fallback, and lldb_private::Stream::PutCString().
|
overridevirtual |
Implements lldb_private::DWARFIndex.
Definition at line 156 of file DebugNamesDWARFIndex.cpp.
References lldb_private::DWARFIndex::DIERefCallback(), DWARFBaseDIE::GetAttributeValueAsUnsigned(), lldb_private::ManualDWARFIndex::GetCompleteObjCClass(), DWARFDebugInfo::GetDIE(), lldb_private::ConstString::GetStringRef(), DWARFDebugInfo::GetUnit(), m_debug_info, m_debug_names_up, m_fallback, lldb_private::DWARFIndex::ReportInvalidDIERef(), DWARFUnit::Supports_DW_AT_APPLE_objc_complete_type(), and ToDIERef().
|
overridevirtual |
Implements lldb_private::DWARFIndex.
Definition at line 241 of file DebugNamesDWARFIndex.cpp.
References DWARFDIE::GetDIE(), lldb_private::ManualDWARFIndex::GetFunctions(), lldb_private::Module::LookupInfo::GetLookupName(), lldb_private::ConstString::GetStringRef(), m_debug_names_up, m_fallback, lldb_private::DWARFIndex::ProcessFunctionDIE(), and ToDIERef().
|
overridevirtual |
Implements lldb_private::DWARFIndex.
Definition at line 267 of file DebugNamesDWARFIndex.cpp.
References lldb_private::RegularExpression::Execute(), lldb_private::ManualDWARFIndex::GetFunctions(), m_debug_names_up, m_fallback, MaybeLogLookupError(), and ProcessEntry().
|
overridevirtual |
Implements lldb_private::DWARFIndex.
Definition at line 102 of file DebugNamesDWARFIndex.cpp.
References lldb_private::RegularExpression::Execute(), lldb_private::ManualDWARFIndex::GetGlobalVariables(), m_debug_names_up, m_fallback, MaybeLogLookupError(), 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::DWARFIndex.
Definition at line 88 of file DebugNamesDWARFIndex.cpp.
References lldb_private::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::DWARFIndex.
Definition at line 127 of file DebugNamesDWARFIndex.cpp.
References SymbolFileDWARF::GetDwoNum(), lldb_private::ManualDWARFIndex::GetGlobalVariables(), DWARFUnit::GetOffset(), DWARFUnit::GetSymbolFileDWARF(), lldbassert, m_debug_names_up, m_fallback, MaybeLogLookupError(), and ProcessEntry().
|
overridevirtual |
Implements lldb_private::DWARFIndex.
Definition at line 228 of file DebugNamesDWARFIndex.cpp.
References lldb_private::ManualDWARFIndex::GetNamespaces(), lldb_private::ConstString::GetStringRef(), m_debug_names_up, m_fallback, and ProcessEntry().
|
inlineoverridevirtual |
Implements lldb_private::DWARFIndex.
Definition at line 39 of file DebugNamesDWARFIndex.h.
|
overridevirtual |
Implements lldb_private::DWARFIndex.
Definition at line 214 of file DebugNamesDWARFIndex.cpp.
References lldb_private::ManualDWARFIndex::GetTypes(), m_debug_names_up, m_fallback, and ProcessEntry().
|
overridevirtual |
Implements lldb_private::DWARFIndex.
Definition at line 201 of file DebugNamesDWARFIndex.cpp.
References lldb_private::ConstString::GetStringRef(), lldb_private::ManualDWARFIndex::GetTypes(), m_debug_names_up, m_fallback, and ProcessEntry().
|
staticprivate |
Definition at line 36 of file DebugNamesDWARFIndex.cpp.
|
staticprivate |
Definition at line 77 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::DWARFIndex.
Definition at line 27 of file DebugNamesDWARFIndex.h.
References m_fallback, and lldb_private::ManualDWARFIndex::Preload().
|
private |
Definition at line 63 of file DebugNamesDWARFIndex.cpp.
References lldb_private::SymbolFile::GetBackingSymbolFile(), lldb_private::Module::GetSymbolFile(), lldb_private::DWARFIndex::m_module, and ToDIERef().
Referenced by GetFunctions(), GetGlobalVariables(), GetNamespaces(), and GetTypes().
|
private |
Definition at line 46 of file DebugNamesDWARFIndex.cpp.
References DIERef::DebugInfo, SymbolFileDWARF::GetDwoNum(), DWARFUnit::GetNonSkeletonUnit(), DWARFUnit::GetOffset(), DWARFUnit::GetSymbolFileDWARF(), DWARFDebugInfo::GetUnitAtOffset(), and m_debug_info.
Referenced by GetCompleteObjCClass(), GetFunctions(), and ProcessEntry().
|
private |
Definition at line 70 of file DebugNamesDWARFIndex.h.
Referenced by GetCompleteObjCClass(), and ToDIERef().
|
private |
Definition at line 74 of file DebugNamesDWARFIndex.h.
|
private |
Definition at line 78 of file DebugNamesDWARFIndex.h.
Referenced by Dump(), GetCompleteObjCClass(), GetFunctions(), GetGlobalVariables(), GetNamespaces(), and GetTypes().
|
private |
Definition at line 75 of file DebugNamesDWARFIndex.h.
|
private |
Definition at line 79 of file DebugNamesDWARFIndex.h.
Referenced by Dump(), GetCompleteObjCClass(), GetFunctions(), GetGlobalVariables(), GetNamespaces(), GetTypes(), and Preload().