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

#include <DWARFIndex.h>

Inheritance diagram for lldb_private::DWARFIndex:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::DWARFIndex:
Collaboration 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. More...
 
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(). More...
 
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 (ConstString name, SymbolFileDWARF &dwarf, const CompilerDeclContext &parent_decl_ctx, uint32_t name_type_mask, 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
 

Protected Member Functions

bool ProcessFunctionDIE (llvm::StringRef name, DIERef ref, SymbolFileDWARF &dwarf, const CompilerDeclContext &parent_decl_ctx, uint32_t name_type_mask, llvm::function_ref< bool(DWARFDIE die)> callback)
 Helper function implementing common logic for processing function dies. More...
 
DIERefCallbackImpl DIERefCallback (llvm::function_ref< bool(DWARFDIE die)> callback, llvm::StringRef name={}) const
 
void ReportInvalidDIERef (DIERef ref, llvm::StringRef name) const
 

Protected Attributes

Modulem_module
 

Detailed Description

Definition at line 20 of file DWARFIndex.h.

Constructor & Destructor Documentation

◆ DWARFIndex()

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

Definition at line 22 of file DWARFIndex.h.

◆ ~DWARFIndex()

DWARFIndex::~DWARFIndex ( )
virtualdefault

Member Function Documentation

◆ DIERefCallback()

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

Definition at line 92 of file DWARFIndex.h.

◆ Dump()

virtual void lldb_private::DWARFIndex::Dump ( Stream s)
pure virtual

◆ GetCompleteObjCClass()

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

◆ GetFunctions() [1/2]

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

◆ GetFunctions() [2/2]

virtual void lldb_private::DWARFIndex::GetFunctions ( ConstString  name,
SymbolFileDWARF dwarf,
const CompilerDeclContext parent_decl_ctx,
uint32_t  name_type_mask,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
pure virtual

◆ GetGlobalVariables() [1/3]

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

◆ GetGlobalVariables() [2/3]

virtual void lldb_private::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::AppleDWARFIndex, lldb_private::ManualDWARFIndex, and lldb_private::DebugNamesDWARFIndex.

◆ GetGlobalVariables() [3/3]

virtual void lldb_private::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::ManualDWARFIndex, lldb_private::AppleDWARFIndex, and lldb_private::DebugNamesDWARFIndex.

◆ GetNamespaces()

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

◆ GetObjCMethods()

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

◆ GetTypes() [1/2]

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

◆ GetTypes() [2/2]

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

◆ Preload()

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

◆ ProcessFunctionDIE()

bool DWARFIndex::ProcessFunctionDIE ( llvm::StringRef  name,
DIERef  ref,
SymbolFileDWARF dwarf,
const CompilerDeclContext parent_decl_ctx,
uint32_t  name_type_mask,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
protected

Helper function implementing common logic for processing function dies.

If the function given by "ref" matches search criteria given by "parent_decl_ctx" and "name_type_mask", it is inserted into the "dies" vector.

Definition at line 21 of file DWARFIndex.cpp.

References SymbolFileDWARF::DIEInDeclContext(), DWARFDIE::GetMangledName(), DWARFDIE::GetName(), DWARFDIE::IsMethod(), lldb_private::ObjCLanguage::IsPossibleObjCMethodName(), and lldb_private::CompilerDeclContext::IsValid().

◆ ReportInvalidDIERef()

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

Member Data Documentation

◆ m_module

Module& lldb_private::DWARFIndex::m_module
protected

Definition at line 66 of file DWARFIndex.h.

Referenced by ReportInvalidDIERef().


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