LLDB mainline
|
#include <AppleDWARFIndex.h>
Public Member Functions | |
AppleDWARFIndex (Module &module, std::unique_ptr< llvm::AppleAcceleratorTable > apple_names, std::unique_ptr< llvm::AppleAcceleratorTable > apple_namespaces, std::unique_ptr< llvm::AppleAcceleratorTable > apple_types, std::unique_ptr< llvm::AppleAcceleratorTable > apple_objc, lldb::DataBufferSP apple_names_storage, lldb::DataBufferSP apple_namespaces_storage, lldb::DataBufferSP apple_types_storage, lldb::DataBufferSP apple_objc_storage) | |
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 |
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 | GetTypesWithQuery (TypeQuery &query, llvm::function_ref< bool(DWARFDIE die)> callback) |
Get type DIEs meeting requires of query. | |
virtual void | GetNamespacesWithParents (ConstString name, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< bool(DWARFDIE die)> callback) |
Get namespace DIEs whose base name match. | |
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 () |
void | ResetStatistics () |
Static Public Member Functions | |
static std::unique_ptr< AppleDWARFIndex > | Create (Module &module, DWARFDataExtractor apple_names, DWARFDataExtractor apple_namespaces, DWARFDataExtractor apple_types, DWARFDataExtractor apple_objc, DWARFDataExtractor debug_str) |
Private Member Functions | |
void | SearchFor (const llvm::AppleAcceleratorTable &table, llvm::StringRef name, llvm::function_ref< bool(DWARFDIE die)> callback, std::optional< dw_tag_t > search_for_tag=std::nullopt, std::optional< uint32_t > search_for_qualhash=std::nullopt) |
} | |
Private Attributes | |
std::unique_ptr< llvm::AppleAcceleratorTable > | m_apple_names_up |
std::unique_ptr< llvm::AppleAcceleratorTable > | m_apple_namespaces_up |
std::unique_ptr< llvm::AppleAcceleratorTable > | m_apple_types_up |
std::unique_ptr< llvm::AppleAcceleratorTable > | m_apple_objc_up |
lldb::DataBufferSP | m_apple_names_storage |
The following storage variables hold the data that the apple accelerator tables tables above point to. | |
lldb::DataBufferSP | m_apple_namespaces_storage |
lldb::DataBufferSP | m_apple_types_storage |
lldb::DataBufferSP | m_apple_objc_storage |
Additional Inherited Members | |
Protected Member Functions inherited from lldb_private::plugin::dwarf::DWARFIndex | |
bool | ProcessFunctionDIE (const Module::LookupInfo &lookup_info, DWARFDIE die, 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. | |
bool | ProcessTypeDIEMatchQuery (TypeQuery &query, DWARFDIE die, llvm::function_ref< bool(DWARFDIE die)> callback) |
Check if the type die can meet the requirements of query. | |
bool | ProcessNamespaceDieMatchParents (const CompilerDeclContext &parent_decl_ctx, DWARFDIE die, llvm::function_ref< bool(DWARFDIE die)> callback) |
Protected Attributes inherited from lldb_private::plugin::dwarf::DWARFIndex | |
Module & | m_module |
StatsDuration | m_index_time |
Definition at line 17 of file AppleDWARFIndex.h.
|
inline |
Definition at line 24 of file AppleDWARFIndex.h.
|
static |
Definition at line 23 of file AppleDWARFIndex.cpp.
References lldb_private::DWARFDataExtractor::GetAsLLVM(), lldb_private::DWARFDataExtractor::GetAsLLVMDWARF(), lldb_private::DataExtractor::GetByteSize(), and lldb_private::DataExtractor::GetSharedDataBuffer().
Referenced by lldb_private::plugin::dwarf::SymbolFileDWARF::InitializeObject().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 303 of file AppleDWARFIndex.cpp.
References m_apple_names_up, m_apple_namespaces_up, m_apple_objc_up, m_apple_types_up, and lldb_private::Stream::PutCString().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 186 of file AppleDWARFIndex.cpp.
References lldb_private::plugin::dwarf::DIERef::DebugInfo, lldb_private::plugin::dwarf::DWARFIndex::DIERefCallback(), HasImplementationFlag(), and m_apple_types_up.
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 276 of file AppleDWARFIndex.cpp.
References lldb_private::plugin::dwarf::DIERef::DebugInfo, lldb_private::Module::LookupInfo::GetLookupName(), m_apple_names_up, lldb_private::plugin::dwarf::DWARFIndex::ProcessFunctionDIE(), and lldb_private::plugin::dwarf::DWARFIndex::ReportInvalidDIERef().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 297 of file AppleDWARFIndex.cpp.
References GetGlobalVariables().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 144 of file AppleDWARFIndex.cpp.
References lldb_private::plugin::dwarf::DWARFIndex::DIERefCallback(), lldb_private::RegularExpression::GetText(), m_apple_names_up, and lldb_private::Mangled::NameMatches().
|
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 137 of file AppleDWARFIndex.cpp.
References m_apple_names_up, and SearchFor().
Referenced by GetFunctions().
|
overridevirtual |
cu must be the skeleton unit if possible, not GetNonSkeletonUnit().
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 159 of file AppleDWARFIndex.cpp.
References lldb_private::plugin::dwarf::DWARFIndex::DIERefCallback(), lldb_private::plugin::dwarf::DWARFUnit::GetNextUnitOffset(), lldb_private::plugin::dwarf::DWARFUnit::GetNonSkeletonUnit(), lldb_private::plugin::dwarf::DWARFUnit::GetOffset(), and m_apple_names_up.
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 269 of file AppleDWARFIndex.cpp.
References m_apple_namespaces_up, and SearchFor().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 179 of file AppleDWARFIndex.cpp.
References m_apple_objc_up, and SearchFor().
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 219 of file AppleDWARFIndex.cpp.
References lldb_private::GetLog(), lldb_private::plugin::dwarf::DWARFDeclContext::GetQualifiedName(), lldb_private::plugin::dwarf::DWARFDeclContext::GetSize(), IsClassOrStruct(), lldb_private::Module::LogMessage(), lldb_private::Lookups, m_apple_names_up, m_apple_types_up, lldb_private::plugin::dwarf::DWARFIndex::m_module, SearchFor(), and lldb_private::TypeCompletion.
|
overridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 212 of file AppleDWARFIndex.cpp.
References m_apple_types_up, and SearchFor().
|
inlineoverridevirtual |
Implements lldb_private::plugin::dwarf::DWARFIndex.
Definition at line 42 of file AppleDWARFIndex.h.
|
private |
}
Search for entries whose name is name
in table
, calling callback
for each match. If search_for_tag
is provided, ignore entries whose tag is not search_for_tag
. If search_for_qualhash
is provided, ignore entries whose qualified name hash does not match search_for_qualhash
. If callback
returns false for an entry, the search is interrupted.
Definition at line 120 of file AppleDWARFIndex.cpp.
References lldb_private::plugin::dwarf::DWARFIndex::DIERefCallback(), EntryHasMatchingQualhash(), and EntryHasMatchingTag().
Referenced by GetGlobalVariables(), GetNamespaces(), GetObjCMethods(), and GetTypes().
|
private |
The following storage variables hold the data that the apple accelerator tables tables above point to.
{
Definition at line 81 of file AppleDWARFIndex.h.
|
private |
Definition at line 74 of file AppleDWARFIndex.h.
Referenced by Dump(), GetFunctions(), GetGlobalVariables(), and GetTypes().
|
private |
Definition at line 82 of file AppleDWARFIndex.h.
|
private |
Definition at line 75 of file AppleDWARFIndex.h.
Referenced by Dump(), and GetNamespaces().
|
private |
Definition at line 84 of file AppleDWARFIndex.h.
|
private |
Definition at line 77 of file AppleDWARFIndex.h.
Referenced by Dump(), and GetObjCMethods().
|
private |
Definition at line 83 of file AppleDWARFIndex.h.
|
private |
Definition at line 76 of file AppleDWARFIndex.h.
Referenced by Dump(), GetCompleteObjCClass(), and GetTypes().