LLDB  mainline
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
lldb_private::DebugNamesDWARFIndex Class Reference

#include <DebugNamesDWARFIndex.h>

Inheritance diagram for lldb_private::DebugNamesDWARFIndex:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::DebugNamesDWARFIndex:
Collaboration graph
[legend]

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. More...
 
void GetGlobalVariables (const RegularExpression &regex, llvm::function_ref< bool(DWARFDIE die)> callback) override
 
void GetGlobalVariables (const DWARFUnit &cu, llvm::function_ref< bool(DWARFDIE die)> callback) override
 
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 (ConstString name, SymbolFileDWARF &dwarf, const CompilerDeclContext &parent_decl_ctx, uint32_t name_type_mask, llvm::function_ref< bool(DWARFDIE die)> callback) override
 
void GetFunctions (const RegularExpression &regex, llvm::function_ref< bool(DWARFDIE die)> callback) override
 
void Dump (Stream &s) override
 
- Public Member Functions inherited from lldb_private::DWARFIndex
 DWARFIndex (Module &module)
 
virtual ~DWARFIndex ()
 

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)
 
llvm::Optional< DIERefToDIERef (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_tGetUnits (const DebugNames &debug_names)
 

Private Attributes

DWARFDebugInfom_debug_info
 
DWARFDataExtractor m_debug_names_data
 
DWARFDataExtractor m_debug_str_data
 
std::unique_ptr< DebugNamesm_debug_names_up
 
ManualDWARFIndex m_fallback
 

Additional Inherited Members

- Protected Member Functions inherited from lldb_private::DWARFIndex
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 inherited from lldb_private::DWARFIndex
Modulem_module
 

Detailed Description

Definition at line 20 of file DebugNamesDWARFIndex.h.

Member Typedef Documentation

◆ DebugNames

using lldb_private::DebugNamesDWARFIndex::DebugNames = llvm::DWARFDebugNames
private

Definition at line 76 of file DebugNamesDWARFIndex.h.

Constructor & Destructor Documentation

◆ DebugNamesDWARFIndex()

lldb_private::DebugNamesDWARFIndex::DebugNamesDWARFIndex ( Module module,
std::unique_ptr< llvm::DWARFDebugNames >  debug_names_up,
DWARFDataExtractor  debug_names_data,
DWARFDataExtractor  debug_str_data,
SymbolFileDWARF dwarf 
)
inlineprivate

Definition at line 59 of file DebugNamesDWARFIndex.h.

Member Function Documentation

◆ Create()

llvm::Expected< std::unique_ptr< DebugNamesDWARFIndex > > DebugNamesDWARFIndex::Create ( Module module,
DWARFDataExtractor  debug_names,
DWARFDataExtractor  debug_str,
SymbolFileDWARF dwarf 
)
static

◆ Dump()

void DebugNamesDWARFIndex::Dump ( Stream s)
overridevirtual

Implements lldb_private::DWARFIndex.

Definition at line 291 of file DebugNamesDWARFIndex.cpp.

References lldb_private::Stream::PutCString(), and string().

◆ GetCompleteObjCClass()

void DebugNamesDWARFIndex::GetCompleteObjCClass ( ConstString  class_name,
bool  must_be_implementation,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
overridevirtual

◆ GetFunctions() [1/2]

void DebugNamesDWARFIndex::GetFunctions ( const RegularExpression regex,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
overridevirtual

◆ GetFunctions() [2/2]

void DebugNamesDWARFIndex::GetFunctions ( ConstString  name,
SymbolFileDWARF dwarf,
const CompilerDeclContext parent_decl_ctx,
uint32_t  name_type_mask,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
overridevirtual

◆ GetGlobalVariables() [1/3]

void DebugNamesDWARFIndex::GetGlobalVariables ( const DWARFUnit cu,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
overridevirtual

Implements lldb_private::DWARFIndex.

Definition at line 125 of file DebugNamesDWARFIndex.cpp.

References DWARFUnit::GetOffset().

◆ GetGlobalVariables() [2/3]

void DebugNamesDWARFIndex::GetGlobalVariables ( const RegularExpression regex,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
overridevirtual

◆ GetGlobalVariables() [3/3]

void DebugNamesDWARFIndex::GetGlobalVariables ( ConstString  basename,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
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 86 of file DebugNamesDWARFIndex.cpp.

References lldb_private::ConstString::GetStringRef().

◆ GetNamespaces()

void DebugNamesDWARFIndex::GetNamespaces ( ConstString  name,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
overridevirtual

◆ GetObjCMethods()

void lldb_private::DebugNamesDWARFIndex::GetObjCMethods ( ConstString  class_name,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
inlineoverridevirtual

Implements lldb_private::DWARFIndex.

Definition at line 38 of file DebugNamesDWARFIndex.h.

◆ GetTypes() [1/2]

void DebugNamesDWARFIndex::GetTypes ( const DWARFDeclContext context,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
overridevirtual

Implements lldb_private::DWARFIndex.

Definition at line 211 of file DebugNamesDWARFIndex.cpp.

◆ GetTypes() [2/2]

void DebugNamesDWARFIndex::GetTypes ( ConstString  name,
llvm::function_ref< bool(DWARFDIE die)>  callback 
)
overridevirtual

◆ GetUnits()

llvm::DenseSet< dw_offset_t > DebugNamesDWARFIndex::GetUnits ( const DebugNames debug_names)
staticprivate

Definition at line 34 of file DebugNamesDWARFIndex.cpp.

◆ MaybeLogLookupError()

void DebugNamesDWARFIndex::MaybeLogLookupError ( llvm::Error  error,
const DebugNames::NameIndex &  ni,
llvm::StringRef  name 
)
staticprivate

◆ Preload()

void lldb_private::DebugNamesDWARFIndex::Preload ( )
inlineoverridevirtual

◆ ProcessEntry()

bool DebugNamesDWARFIndex::ProcessEntry ( const DebugNames::Entry entry,
llvm::function_ref< bool(DWARFDIE die)>  callback,
llvm::StringRef  name 
)
private

Definition at line 61 of file DebugNamesDWARFIndex.cpp.

◆ ToDIERef()

llvm::Optional< DIERef > DebugNamesDWARFIndex::ToDIERef ( const DebugNames::Entry entry)
private

Member Data Documentation

◆ m_debug_info

DWARFDebugInfo& lldb_private::DebugNamesDWARFIndex::m_debug_info
private

Definition at line 69 of file DebugNamesDWARFIndex.h.

◆ m_debug_names_data

DWARFDataExtractor lldb_private::DebugNamesDWARFIndex::m_debug_names_data
private

Definition at line 73 of file DebugNamesDWARFIndex.h.

◆ m_debug_names_up

std::unique_ptr<DebugNames> lldb_private::DebugNamesDWARFIndex::m_debug_names_up
private

Definition at line 77 of file DebugNamesDWARFIndex.h.

◆ m_debug_str_data

DWARFDataExtractor lldb_private::DebugNamesDWARFIndex::m_debug_str_data
private

Definition at line 74 of file DebugNamesDWARFIndex.h.

◆ m_fallback

ManualDWARFIndex lldb_private::DebugNamesDWARFIndex::m_fallback
private

Definition at line 78 of file DebugNamesDWARFIndex.h.

Referenced by Preload().


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