LLDB mainline
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lldb_private::plugin::dwarf::DWARFIndex Class Referenceabstract

#include <DWARFIndex.h>

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

Classes

class  DIERefCallbackImpl
 

Public Member Functions

 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 &regex, 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 &regex, llvm::function_ref< bool(DWARFDIE die)> callback)=0
 
virtual void Dump (Stream &s)=0
 
StatsDuration::Duration GetIndexTime ()
 

Protected Member Functions

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

Modulem_module
 
StatsDuration m_index_time
 

Detailed Description

Definition at line 25 of file DWARFIndex.h.

Constructor & Destructor Documentation

◆ DWARFIndex()

lldb_private::plugin::dwarf::DWARFIndex::DWARFIndex ( Module module)
inline

Definition at line 27 of file DWARFIndex.h.

◆ ~DWARFIndex()

DWARFIndex::~DWARFIndex ( )
virtualdefault

Member Function Documentation

◆ DIERefCallback()

DIERefCallbackImpl lldb_private::plugin::dwarf::DWARFIndex::DIERefCallback ( llvm::function_ref< bool(DWARFDIE die)>  callback,
llvm::StringRef  name = {} 
) const
inlineprotected

◆ 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< bool(DWARFDIE die)>  callback 
)
pure virtual

◆ GetFullyQualifiedType()

void DWARFIndex::GetFullyQualifiedType ( const DWARFDeclContext context,
llvm::function_ref< bool(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 118 of file DWARFIndex.cpp.

References GetFullyQualifiedTypeImpl(), and GetTypes().

◆ GetFullyQualifiedTypeImpl()

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

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

Definition at line 126 of file DWARFIndex.cpp.

References lldb_private::plugin::dwarf::DWARFBaseDIE::GetCU(), and lldb_private::plugin::dwarf::DWARFDIE::GetDIE().

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

◆ GetFunctions() [1/2]

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

◆ GetFunctions() [2/2]

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

◆ GetGlobalVariables() [1/3]

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

◆ GetGlobalVariables() [2/3]

virtual void lldb_private::plugin::dwarf::DWARFIndex::GetGlobalVariables ( ConstString  basename,
llvm::function_ref< bool(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< bool(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()

StatsDuration::Duration lldb_private::plugin::dwarf::DWARFIndex::GetIndexTime ( )
inline

Definition at line 77 of file DWARFIndex.h.

References m_index_time.

◆ GetNamespaces()

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

◆ GetObjCMethods()

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

◆ GetTypes() [1/2]

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

◆ GetTypes() [2/2]

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

◆ Preload()

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

◆ ProcessFunctionDIE()

bool DWARFIndex::ProcessFunctionDIE ( const Module::LookupInfo lookup_info,
DIERef  ref,
SymbolFileDWARF dwarf,
const CompilerDeclContext parent_decl_ctx,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
protected

◆ ReportInvalidDIERef()

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

Member Data Documentation

◆ m_index_time

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

◆ m_module

Module& lldb_private::plugin::dwarf::DWARFIndex::m_module
protected

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