LLDB mainline
lldb_private::plugin::dwarf::DWARFIndex Class Referenceabstract

#include <DWARFIndex.h>

Inheritance diagram for lldb_private::plugin::dwarf::DWARFIndex:
[legend]

Classes

class  DIERefCallbackImpl

Public Member Functions

 DWARFIndex (Module &module)
virtual ~DWARFIndex ()
virtual void Preload ()=0
virtual void GetGlobalVariables (ConstString basename, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
 Finds global variables with the given base name.
virtual void GetGlobalVariables (const RegularExpression &regex, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
virtual void GetGlobalVariables (DWARFUnit &cu, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
 cu must be the skeleton unit if possible, not GetNonSkeletonUnit().
virtual void GetObjCMethods (ConstString class_name, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
virtual void GetCompleteObjCClass (ConstString class_name, bool must_be_implementation, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
virtual void GetTypes (ConstString name, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
virtual void GetTypes (const DWARFDeclContext &context, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
virtual void GetFullyQualifiedType (const DWARFDeclContext &context, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
 Finds all DIEs whose fully qualified name matches context.
virtual void GetNamespaces (ConstString name, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
virtual void GetTypesWithQuery (TypeQuery &query, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
 Get type DIEs meeting requires of query.
virtual void GetNamespacesWithParents (ConstString name, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< IterationAction(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< IterationAction(DWARFDIE die)> callback)=0
virtual void GetFunctions (const std::vector< Module::LookupInfo > &lookup_infos, SymbolFileDWARF &dwarf, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
virtual void GetFunctions (const RegularExpression &regex, llvm::function_ref< IterationAction(DWARFDIE die)> callback)=0
virtual void Dump (Stream &s)=0
virtual StatsDuration::Duration GetIndexTime ()
 Time spent creating this index and any index it falls back to, including loading them from or saving them to the index cache.
virtual void ResetStatistics ()

Protected Member Functions

IterationAction ProcessFunctionDIE (const Module::LookupInfo &lookup_info, DWARFDIE die, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
 Helper function implementing common logic for processing function dies.
DIERefCallbackImpl DIERefCallback (llvm::function_ref< IterationAction(DWARFDIE die)> callback, llvm::StringRef name={}) const
void ReportInvalidDIERef (DIERef ref, llvm::StringRef name) const
IterationAction GetFullyQualifiedTypeImpl (const DWARFDeclContext &context, DWARFDIE die, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
 Implementation of GetFullyQualifiedType to check a single entry, shareable with derived classes.
IterationAction ProcessTypeDIEMatchQuery (TypeQuery &query, DWARFDIE die, llvm::function_ref< IterationAction(DWARFDIE die)> callback)
 Check if the type die can meet the requirements of query.
IterationAction ProcessNamespaceDieMatchParents (const CompilerDeclContext &parent_decl_ctx, DWARFDIE die, llvm::function_ref< IterationAction(DWARFDIE die)> callback)

Protected Attributes

Module & m_module
StatsDuration m_index_time

Detailed Description

Definition at line 26 of file DWARFIndex.h.

Constructor & Destructor Documentation

◆ DWARFIndex()

◆ ~DWARFIndex()

DWARFIndex::~DWARFIndex ( )
virtualdefault

Member Function Documentation

◆ DIERefCallback()

◆ Dump()

virtual void lldb_private::plugin::dwarf::DWARFIndex::Dump ( Stream & s)
pure virtual

◆ GetCompleteObjCClass()

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetCompleteObjCClass ( ConstString class_name,
bool must_be_implementation,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
pure virtual

◆ GetFullyQualifiedType()

void DWARFIndex::GetFullyQualifiedType ( const DWARFDeclContext & context,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
virtual

Finds all DIEs whose fully qualified name matches context.

A base implementation is provided, and it uses the entire CU to check the DIE parent hierarchy. Specializations should override this if they are able to provide a faster implementation.

Reimplemented in lldb_private::plugin::dwarf::DebugNamesDWARFIndex.

Definition at line 115 of file DWARFIndex.cpp.

References GetFullyQualifiedTypeImpl(), and GetTypes().

◆ GetFullyQualifiedTypeImpl()

IterationAction DWARFIndex::GetFullyQualifiedTypeImpl ( const DWARFDeclContext & context,
DWARFDIE die,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
protected

Implementation of GetFullyQualifiedType to check a single entry, shareable with derived classes.

Definition at line 123 of file DWARFIndex.cpp.

References lldb_private::Continue, and lldb_private::plugin::dwarf::DWARFDIE::GetDWARFDeclContext().

Referenced by lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetFullyQualifiedType(), and GetFullyQualifiedType().

◆ GetFunctions() [1/3]

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetFunctions ( const Module::LookupInfo & lookup_info,
SymbolFileDWARF & dwarf,
const CompilerDeclContext & parent_decl_ctx,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
pure virtual

◆ GetFunctions() [2/3]

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetFunctions ( const RegularExpression & regex,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
pure virtual

◆ GetFunctions() [3/3]

void DWARFIndex::GetFunctions ( const std::vector< Module::LookupInfo > & lookup_infos,
SymbolFileDWARF & dwarf,
const CompilerDeclContext & parent_decl_ctx,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
virtual

Definition at line 176 of file DWARFIndex.cpp.

References GetFunctions().

◆ GetGlobalVariables() [1/3]

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetGlobalVariables ( const RegularExpression & regex,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
pure virtual

◆ GetGlobalVariables() [2/3]

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetGlobalVariables ( ConstString basename,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
pure virtual

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.

Implemented in lldb_private::plugin::dwarf::AppleDWARFIndex, lldb_private::plugin::dwarf::DebugNamesDWARFIndex, and lldb_private::plugin::dwarf::ManualDWARFIndex.

◆ GetGlobalVariables() [3/3]

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetGlobalVariables ( DWARFUnit & cu,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
pure virtual

cu must be the skeleton unit if possible, not GetNonSkeletonUnit().

Implemented in lldb_private::plugin::dwarf::AppleDWARFIndex, lldb_private::plugin::dwarf::DebugNamesDWARFIndex, and lldb_private::plugin::dwarf::ManualDWARFIndex.

◆ GetIndexTime()

virtual StatsDuration::Duration lldb_private::plugin::dwarf::DWARFIndex::GetIndexTime ( )
inlinevirtual

Time spent creating this index and any index it falls back to, including loading them from or saving them to the index cache.

Reimplemented in lldb_private::plugin::dwarf::DebugNamesDWARFIndex.

Definition at line 101 of file DWARFIndex.h.

References m_index_time.

Referenced by lldb_private::plugin::dwarf::DebugNamesDWARFIndex::GetIndexTime().

◆ GetNamespaces()

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetNamespaces ( ConstString name,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
pure virtual

◆ GetNamespacesWithParents()

void DWARFIndex::GetNamespacesWithParents ( ConstString name,
const CompilerDeclContext & parent_decl_ctx,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
virtual

Get namespace DIEs whose base name match.

Parameters
namewith
parent_decl_ctxin its decl parent chain. A base implementation is provided. Specializations should override this if they are able to provide a faster implementation.

Reimplemented in lldb_private::plugin::dwarf::DebugNamesDWARFIndex.

Definition at line 168 of file DWARFIndex.cpp.

References GetNamespaces(), and ProcessNamespaceDieMatchParents().

◆ GetObjCMethods()

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetObjCMethods ( ConstString class_name,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
pure virtual

◆ GetTypes() [1/2]

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetTypes ( const DWARFDeclContext & context,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
pure virtual

◆ GetTypes() [2/2]

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetTypes ( ConstString name,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
pure virtual

◆ GetTypesWithQuery()

void DWARFIndex::GetTypesWithQuery ( TypeQuery & query,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
virtual

Get type DIEs meeting requires of query.

in its decl parent chain as subset. A base implementation is provided, Specializations should override this if they are able to provide a faster implementation.

Reimplemented in lldb_private::plugin::dwarf::DebugNamesDWARFIndex.

Definition at line 132 of file DWARFIndex.cpp.

References lldb_private::TypeQuery::GetTypeBasename(), and GetTypes().

◆ Preload()

virtual void lldb_private::plugin::dwarf::DWARFIndex::Preload ( )
pure virtual

◆ ProcessFunctionDIE()

◆ ProcessNamespaceDieMatchParents()

IterationAction DWARFIndex::ProcessNamespaceDieMatchParents ( const CompilerDeclContext & parent_decl_ctx,
DWARFDIE die,
llvm::function_ref< IterationAction(DWARFDIE die)> callback )
protected

◆ ProcessTypeDIEMatchQuery()

◆ ReportInvalidDIERef()

void DWARFIndex::ReportInvalidDIERef ( DIERef ref,
llvm::StringRef name ) const
protected

◆ ResetStatistics()

virtual void lldb_private::plugin::dwarf::DWARFIndex::ResetStatistics ( )
inlinevirtual

Member Data Documentation

◆ m_index_time

StatsDuration lldb_private::plugin::dwarf::DWARFIndex::m_index_time
protected

◆ m_module


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