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

SymbolFileOnDemand wraps an actual SymbolFile by providing on demand symbol parsing/indexing to improve performance. More...

#include <SymbolFileOnDemand.h>

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

Public Member Functions

 SymbolFileOnDemand (std::unique_ptr< SymbolFile > &&symbol_file)
 
 ~SymbolFileOnDemand () override
 
llvm::StringRef GetPluginName () override
 
bool GetLoadDebugInfoEnabled () override
 Whether debug info will be loaded or not. More...
 
void SetLoadDebugInfoEnabled () override
 Specify debug info should be loaded. More...
 
uint32_t GetNumCompileUnits () override
 
lldb::CompUnitSP GetCompileUnitAtIndex (uint32_t idx) override
 
SymbolFileGetBackingSymbolFile () override
 SymbolFileOnDemand class overrides this to return the underlying backing SymbolFile implementation that loads on-demand. More...
 
uint32_t CalculateAbilities () override
 
std::recursive_mutex & GetModuleMutex () const override
 Symbols file subclasses should override this to return the Module that owns the TypeSystem that this symbol file modifies type information in. More...
 
lldb::LanguageType ParseLanguage (lldb_private::CompileUnit &comp_unit) override
 
lldb_private::XcodeSDK ParseXcodeSDK (lldb_private::CompileUnit &comp_unit) override
 Return the Xcode SDK comp_unit was compiled against. More...
 
void InitializeObject () override
 Initialize the SymbolFile object. More...
 
size_t ParseFunctions (lldb_private::CompileUnit &comp_unit) override
 
bool ParseLineTable (lldb_private::CompileUnit &comp_unit) override
 
bool ParseDebugMacros (lldb_private::CompileUnit &comp_unit) override
 
bool ForEachExternalModule (lldb_private::CompileUnit &, llvm::DenseSet< lldb_private::SymbolFile * > &, llvm::function_ref< bool(lldb_private::Module &)>) override
 
bool ParseSupportFiles (lldb_private::CompileUnit &comp_unit, lldb_private::FileSpecList &support_files) override
 
bool ParseIsOptimized (lldb_private::CompileUnit &comp_unit) override
 
size_t ParseTypes (lldb_private::CompileUnit &comp_unit) override
 
bool ParseImportedModules (const lldb_private::SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
 
size_t ParseBlocksRecursive (lldb_private::Function &func) override
 
size_t ParseVariablesForContext (const lldb_private::SymbolContext &sc) override
 
lldb_private::TypeResolveTypeUID (lldb::user_id_t type_uid) override
 
llvm::Optional< ArrayInfoGetDynamicArrayInfoForUID (lldb::user_id_t type_uid, const lldb_private::ExecutionContext *exe_ctx) override
 If type_uid points to an array type, return its characteristics. More...
 
bool CompleteType (lldb_private::CompilerType &compiler_type) override
 
lldb_private::CompilerDecl GetDeclForUID (lldb::user_id_t uid) override
 
lldb_private::CompilerDeclContext GetDeclContextForUID (lldb::user_id_t uid) override
 
lldb_private::CompilerDeclContext GetDeclContextContainingUID (lldb::user_id_t uid) override
 
void ParseDeclsForContext (lldb_private::CompilerDeclContext decl_ctx) override
 
uint32_t ResolveSymbolContext (const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override
 
lldb_private::Status CalculateFrameVariableError (lldb_private::StackFrame &frame) override
 Subclasses will override this function to for GetFrameVariableError(). More...
 
uint32_t ResolveSymbolContext (const lldb_private::SourceLocationSpec &src_location_spec, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContextList &sc_list) override
 
void Dump (lldb_private::Stream &s) override
 
void DumpClangAST (lldb_private::Stream &s) override
 
void FindGlobalVariables (lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override
 
void FindGlobalVariables (const lldb_private::RegularExpression &regex, uint32_t max_matches, lldb_private::VariableList &variables) override
 
void FindFunctions (const lldb_private::Module::LookupInfo &lookup_info, const lldb_private::CompilerDeclContext &parent_decl_ctx, bool include_inlines, lldb_private::SymbolContextList &sc_list) override
 
void FindFunctions (const lldb_private::RegularExpression &regex, bool include_inlines, lldb_private::SymbolContextList &sc_list) override
 
void GetMangledNamesForFunction (const std::string &scope_qualified_name, std::vector< lldb_private::ConstString > &mangled_names) override
 
void FindTypes (lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, llvm::DenseSet< lldb_private::SymbolFile * > &searched_symbol_files, lldb_private::TypeMap &types) override
 
void FindTypes (llvm::ArrayRef< lldb_private::CompilerContext > pattern, lldb_private::LanguageSet languages, llvm::DenseSet< SymbolFile * > &searched_symbol_files, lldb_private::TypeMap &types) override
 
void GetTypes (lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list) override
 
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage (lldb::LanguageType language) override
 
lldb_private::CompilerDeclContext FindNamespace (lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx) override
 
std::vector< std::unique_ptr< lldb_private::CallEdge > > ParseCallEdgesInFunction (UserID func_id) override
 
lldb::UnwindPlanSP GetUnwindPlan (const Address &address, const RegisterInfoResolver &resolver) override
 
llvm::Expected< lldb::addr_tGetParameterStackSize (Symbol &symbol) override
 Return the number of stack bytes taken up by the parameters to this function. More...
 
void PreloadSymbols () override
 
uint64_t GetDebugInfoSize () override
 Metrics gathering functions. More...
 
lldb_private::StatsDuration::Duration GetDebugInfoParseTime () override
 Return the time taken to parse the debug information. More...
 
lldb_private::StatsDuration::Duration GetDebugInfoIndexTime () override
 Return the time it took to index the debug information in the object file. More...
 
uint32_t GetAbilities () override
 Get a mask of what this symbol file supports for the object file that it was constructed with. More...
 
SymtabGetSymtab () override
 
ObjectFileGetObjectFile () override
 
const ObjectFileGetObjectFile () const override
 
ObjectFileGetMainObjectFile () override
 
void SectionFileAddressesChanged () override
 Notify the SymbolFile that the file addresses in the Sections for this module have been changed. More...
 
bool GetDebugInfoIndexWasLoadedFromCache () const override
 Accessors for the bool that indicates if the debug info index was loaded from, or saved to the module index cache. More...
 
void SetDebugInfoIndexWasLoadedFromCache () override
 
bool GetDebugInfoIndexWasSavedToCache () const override
 
void SetDebugInfoIndexWasSavedToCache () override
 
bool GetDebugInfoHadFrameVariableErrors () const override
 Accessors for the bool that indicates if there was debug info, but errors stopped variables from being able to be displayed correctly. More...
 
void SetDebugInfoHadFrameVariableErrors () override
 
- Public Member Functions inherited from lldb_private::SymbolFile
 SymbolFile ()=default
 
 ~SymbolFile () override=default
 
virtual bool ForEachExternalModule (lldb_private::CompileUnit &comp_unit, llvm::DenseSet< lldb_private::SymbolFile * > &visited_symbol_files, llvm::function_ref< bool(Module &)> lambda)
 Apply a lambda to each external lldb::Module referenced by this comp_unit. More...
 
virtual bool ParseSupportFiles (CompileUnit &comp_unit, FileSpecList &support_files)=0
 
Status GetFrameVariableError (StackFrame &frame)
 Get an error that describes why variables might be missing for a given symbol context. More...
 
virtual void FindTypes (llvm::ArrayRef< CompilerContext > pattern, LanguageSet languages, llvm::DenseSet< lldb_private::SymbolFile * > &searched_symbol_files, TypeMap &types)
 Find types specified by a CompilerContextPattern. More...
 
virtual void AddSymbols (Symtab &symtab)
 
virtual ModuleList GetDebugInfoModules ()
 Get the additional modules that this symbol file uses to parse debug info. More...
 
- Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
 
virtual ~PluginInterface ()=default
 
 PluginInterface (const PluginInterface &)=delete
 
PluginInterfaceoperator= (const PluginInterface &)=delete
 

Private Member Functions

LogGetLog () const
 
ConstString GetSymbolFileName ()
 

Private Attributes

bool m_debug_info_enabled = false
 
bool m_preload_symbols = false
 
std::unique_ptr< SymbolFilem_sym_file_impl
 

Static Private Attributes

static char ID
 LLVM RTTI support. More...
 
bool isA (const void *ClassID) const override
 LLVM RTTI support. More...
 
static bool classof (const SymbolFile *obj)
 

Additional Inherited Members

- Public Types inherited from lldb_private::SymbolFile
enum  Abilities {
  CompileUnits = (1u << 0), LineTables = (1u << 1), Functions = (1u << 2), Blocks = (1u << 3),
  GlobalVariables = (1u << 4), LocalVariables = (1u << 5), VariableTypes = (1u << 6), kAllAbilities = ((1u << 7) - 1u)
}
 
- Static Public Member Functions inherited from lldb_private::SymbolFile
static SymbolFileFindPlugin (lldb::ObjectFileSP objfile_sp)
 
static bool classof (const SymbolFile *obj)
 
- Protected Member Functions inherited from lldb_private::SymbolFile
void AssertModuleLock ()
 

Detailed Description

SymbolFileOnDemand wraps an actual SymbolFile by providing on demand symbol parsing/indexing to improve performance.

By default SymbolFileOnDemand will skip load the underlying symbols. Any client can on demand hydrate the underlying SymbolFile via SymbolFile::SetLoadDebugInfoEnabled().

Definition at line 32 of file SymbolFileOnDemand.h.

Constructor & Destructor Documentation

◆ SymbolFileOnDemand()

SymbolFileOnDemand::SymbolFileOnDemand ( std::unique_ptr< SymbolFile > &&  symbol_file)

Definition at line 21 of file SymbolFileOnDemand.cpp.

◆ ~SymbolFileOnDemand()

SymbolFileOnDemand::~SymbolFileOnDemand ( )
overridedefault

Member Function Documentation

◆ CalculateAbilities()

uint32_t SymbolFileOnDemand::CalculateAbilities ( )
overridevirtual

Implements lldb_private::SymbolFile.

Definition at line 27 of file SymbolFileOnDemand.cpp.

References m_sym_file_impl.

◆ CalculateFrameVariableError()

Status SymbolFileOnDemand::CalculateFrameVariableError ( lldb_private::StackFrame frame)
overridevirtual

Subclasses will override this function to for GetFrameVariableError().

This allows GetFrameVariableError() to set the member variable m_debug_info_had_variable_errors correctly without users having to do it manually which is error prone.

Reimplemented from lldb_private::SymbolFile.

Definition at line 277 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.

◆ classof()

static bool lldb_private::SymbolFileOnDemand::classof ( const SymbolFile obj)
inlinestatic

Definition at line 42 of file SymbolFileOnDemand.h.

References ID, and lldb_private::SymbolFile::isA().

◆ CompleteType()

bool SymbolFileOnDemand::CompleteType ( lldb_private::CompilerType compiler_type)
overridevirtual

◆ Dump()

void SymbolFileOnDemand::Dump ( lldb_private::Stream s)
overridevirtual

◆ DumpClangAST()

void SymbolFileOnDemand::DumpClangAST ( lldb_private::Stream s)
overridevirtual

◆ FindFunctions() [1/2]

void SymbolFileOnDemand::FindFunctions ( const lldb_private::Module::LookupInfo lookup_info,
const lldb_private::CompilerDeclContext parent_decl_ctx,
bool  include_inlines,
lldb_private::SymbolContextList sc_list 
)
overridevirtual

◆ FindFunctions() [2/2]

void SymbolFileOnDemand::FindFunctions ( const lldb_private::RegularExpression regex,
bool  include_inlines,
lldb_private::SymbolContextList sc_list 
)
overridevirtual

◆ FindGlobalVariables() [1/2]

void SymbolFileOnDemand::FindGlobalVariables ( const lldb_private::RegularExpression regex,
uint32_t  max_matches,
lldb_private::VariableList variables 
)
overridevirtual

◆ FindGlobalVariables() [2/2]

void SymbolFileOnDemand::FindGlobalVariables ( lldb_private::ConstString  name,
const lldb_private::CompilerDeclContext parent_decl_ctx,
uint32_t  max_matches,
lldb_private::VariableList variables 
)
overridevirtual

◆ FindNamespace()

CompilerDeclContext SymbolFileOnDemand::FindNamespace ( lldb_private::ConstString  name,
const lldb_private::CompilerDeclContext parent_decl_ctx 
)
overridevirtual

◆ FindTypes() [1/2]

void SymbolFileOnDemand::FindTypes ( lldb_private::ConstString  name,
const lldb_private::CompilerDeclContext parent_decl_ctx,
uint32_t  max_matches,
llvm::DenseSet< lldb_private::SymbolFile * > &  searched_symbol_files,
lldb_private::TypeMap types 
)
overridevirtual

◆ FindTypes() [2/2]

void lldb_private::SymbolFileOnDemand::FindTypes ( llvm::ArrayRef< lldb_private::CompilerContext pattern,
lldb_private::LanguageSet  languages,
llvm::DenseSet< SymbolFile * > &  searched_symbol_files,
lldb_private::TypeMap types 
)
override

◆ ForEachExternalModule()

bool SymbolFileOnDemand::ForEachExternalModule ( lldb_private::CompileUnit ,
llvm::DenseSet< lldb_private::SymbolFile * > &  ,
llvm::function_ref< bool(lldb_private::Module &)>   
)
override

◆ GetAbilities()

uint32_t SymbolFileOnDemand::GetAbilities ( )
overridevirtual

Get a mask of what this symbol file supports for the object file that it was constructed with.

Each symbol file gets to respond with a mask of abilities that it supports for each object file. This happens when we are trying to figure out which symbol file plug-in will get used for a given object file. The plug-in that responds with the best mix of "SymbolFile::Abilities" bits set, will get chosen to be the symbol file parser. This allows each plug-in to check for sections that contain data a symbol file plug-in would need. For example the DWARF plug-in requires DWARF sections in a file that contain debug information. If the DWARF plug-in doesn't find these sections, it won't respond with many ability bits set, and we will probably fall back to the symbol table SymbolFile plug-in which uses any information in the symbol table. Also, plug-ins might check for some specific symbols in a symbol table in the case where the symbol table contains debug information (STABS and COFF). Not a lot of work should happen in these functions as the plug-in might not get selected due to another plug-in having more abilities. Any initialization work should be saved for "void SymbolFile::InitializeObject()" which will get called on the SymbolFile object with the best set of abilities.

Returns
A uint32_t mask containing bits from the SymbolFile::Abilities enumeration. Any bits that are set represent an ability that this symbol plug-in can parse from the object file.

Implements lldb_private::SymbolFile.

Definition at line 594 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.

◆ GetBackingSymbolFile()

SymbolFile* lldb_private::SymbolFileOnDemand::GetBackingSymbolFile ( )
inlineoverridevirtual

SymbolFileOnDemand class overrides this to return the underlying backing SymbolFile implementation that loads on-demand.

Reimplemented from lldb_private::SymbolFile.

Definition at line 58 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

◆ GetCompileUnitAtIndex()

CompUnitSP SymbolFileOnDemand::GetCompileUnitAtIndex ( uint32_t  idx)
overridevirtual

Implements lldb_private::SymbolFile.

Definition at line 588 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.

◆ GetDebugInfoHadFrameVariableErrors()

bool lldb_private::SymbolFileOnDemand::GetDebugInfoHadFrameVariableErrors ( ) const
inlineoverridevirtual

Accessors for the bool that indicates if there was debug info, but errors stopped variables from being able to be displayed correctly.

See GetFrameVariableError() for details on what are considered errors.

Implements lldb_private::SymbolFile.

Definition at line 222 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

◆ GetDebugInfoIndexTime()

StatsDuration::Duration SymbolFileOnDemand::GetDebugInfoIndexTime ( )
overridevirtual

Return the time it took to index the debug information in the object file.

Returns
0.0 if the file doesn't need to be indexed or if it hasn't been indexed yet, or a valid duration if it has.

Reimplemented from lldb_private::SymbolFile.

Definition at line 565 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.

◆ GetDebugInfoIndexWasLoadedFromCache()

bool lldb_private::SymbolFileOnDemand::GetDebugInfoIndexWasLoadedFromCache ( ) const
inlineoverridevirtual

Accessors for the bool that indicates if the debug info index was loaded from, or saved to the module index cache.

In statistics it is handy to know if a module's debug info was loaded from or saved to the cache. When the debug info index is loaded from the cache startup times can be faster. When the cache is enabled and the debug info index is saved to the cache, debug sessions can be slower. These accessors can be accessed by the statistics and emitted to help track these costs.

Implements lldb_private::SymbolFile.

Definition at line 210 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

◆ GetDebugInfoIndexWasSavedToCache()

bool lldb_private::SymbolFileOnDemand::GetDebugInfoIndexWasSavedToCache ( ) const
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 216 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

◆ GetDebugInfoParseTime()

StatsDuration::Duration SymbolFileOnDemand::GetDebugInfoParseTime ( )
overridevirtual

Return the time taken to parse the debug information.

Returns
0.0 if no information has been parsed or if there is no computational cost to parsing the debug information.

Reimplemented from lldb_private::SymbolFile.

Definition at line 558 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.

◆ GetDebugInfoSize()

uint64_t SymbolFileOnDemand::GetDebugInfoSize ( )
overridevirtual

Metrics gathering functions.

Return the size in bytes of all debug information in the symbol file.

If the debug information is contained in sections of an ObjectFile, then this call should add the size of all sections that contain debug information. Symbols the symbol tables are not considered debug information for this call to make it easy and quick for this number to be calculated. If the symbol file is all debug information, the size of the entire file should be returned. The default implementation of this function will iterate over all sections in a module and add up their debug info only section byte sizes.

Implements lldb_private::SymbolFile.

Definition at line 551 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.

◆ GetDeclContextContainingUID()

CompilerDeclContext SymbolFileOnDemand::GetDeclContextContainingUID ( lldb::user_id_t  uid)
overridevirtual

◆ GetDeclContextForUID()

CompilerDeclContext SymbolFileOnDemand::GetDeclContextForUID ( lldb::user_id_t  uid)
overridevirtual

◆ GetDeclForUID()

CompilerDecl SymbolFileOnDemand::GetDeclForUID ( lldb::user_id_t  uid)
overridevirtual

◆ GetDynamicArrayInfoForUID()

llvm::Optional< SymbolFile::ArrayInfo > SymbolFileOnDemand::GetDynamicArrayInfoForUID ( lldb::user_id_t  type_uid,
const lldb_private::ExecutionContext exe_ctx 
)
overridevirtual

If type_uid points to an array type, return its characteristics.

To support variable-length array types, this function takes an optional ExecutionContext. If exe_ctx is non-null, the dynamic characteristics for that context are returned.

Implements lldb_private::SymbolFile.

Definition at line 201 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.

◆ GetLoadDebugInfoEnabled()

bool lldb_private::SymbolFileOnDemand::GetLoadDebugInfoEnabled ( )
inlineoverridevirtual

Whether debug info will be loaded or not.

It will be true for most implementations except SymbolFileOnDemand.

Reimplemented from lldb_private::SymbolFile.

Definition at line 51 of file SymbolFileOnDemand.h.

References m_debug_info_enabled.

◆ GetLog()

Log* lldb_private::SymbolFileOnDemand::GetLog ( ) const
inlineprivate

◆ GetMainObjectFile()

ObjectFile* lldb_private::SymbolFileOnDemand::GetMainObjectFile ( )
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 202 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

◆ GetMangledNamesForFunction()

void SymbolFileOnDemand::GetMangledNamesForFunction ( const std::string scope_qualified_name,
std::vector< lldb_private::ConstString > &  mangled_names 
)
overridevirtual

◆ GetModuleMutex()

std::recursive_mutex & SymbolFileOnDemand::GetModuleMutex ( ) const
overridevirtual

Symbols file subclasses should override this to return the Module that owns the TypeSystem that this symbol file modifies type information in.

Reimplemented from lldb_private::SymbolFile.

Definition at line 33 of file SymbolFileOnDemand.cpp.

References m_sym_file_impl.

◆ GetNumCompileUnits()

uint32_t SymbolFileOnDemand::GetNumCompileUnits ( )
overridevirtual

Implements lldb_private::SymbolFile.

Definition at line 582 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.

◆ GetObjectFile() [1/2]

const ObjectFile* lldb_private::SymbolFileOnDemand::GetObjectFile ( ) const
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 199 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

◆ GetObjectFile() [2/2]

ObjectFile* lldb_private::SymbolFileOnDemand::GetObjectFile ( )
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 196 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

Referenced by GetSymbolFileName().

◆ GetParameterStackSize()

llvm::Expected< lldb::addr_t > SymbolFileOnDemand::GetParameterStackSize ( Symbol symbol)
overridevirtual

Return the number of stack bytes taken up by the parameters to this function.

Reimplemented from lldb_private::SymbolFile.

Definition at line 524 of file SymbolFileOnDemand.cpp.

References GetLog(), lldb_private::Symbol::GetName(), lldb_private::SymbolFile::GetParameterStackSize(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.

◆ GetPluginName()

llvm::StringRef lldb_private::SymbolFileOnDemand::GetPluginName ( )
inlineoverridevirtual

Implements lldb_private::PluginInterface.

Definition at line 49 of file SymbolFileOnDemand.h.

◆ GetSymbolFileName()

ConstString lldb_private::SymbolFileOnDemand::GetSymbolFileName ( )
inlineprivate

◆ GetSymtab()

Symtab* lldb_private::SymbolFileOnDemand::GetSymtab ( )
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 194 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

Referenced by FindFunctions(), and FindGlobalVariables().

◆ GetTypes()

void SymbolFileOnDemand::GetTypes ( lldb_private::SymbolContextScope sc_scope,
lldb::TypeClass  type_mask,
lldb_private::TypeList type_list 
)
overridevirtual

◆ GetTypeSystemForLanguage()

llvm::Expected< lldb::TypeSystemSP > SymbolFileOnDemand::GetTypeSystemForLanguage ( lldb::LanguageType  language)
overridevirtual

◆ GetUnwindPlan()

lldb::UnwindPlanSP SymbolFileOnDemand::GetUnwindPlan ( const Address address,
const RegisterInfoResolver resolver 
)
overridevirtual

◆ InitializeObject()

void SymbolFileOnDemand::InitializeObject ( )
overridevirtual

Initialize the SymbolFile object.

The SymbolFile object with the best set of abilities (detected in "uint32_t SymbolFile::GetAbilities()) will have this function called if it is chosen to parse an object file. More complete initialization can happen in this function which will get called prior to any other functions in the SymbolFile protocol.

Reimplemented from lldb_private::SymbolFile.

Definition at line 37 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.

Referenced by SetLoadDebugInfoEnabled().

◆ isA()

bool lldb_private::SymbolFileOnDemand::isA ( const void *  ClassID) const
inlineoverridevirtual

LLVM RTTI support.

Reimplemented from lldb_private::SymbolFile.

Definition at line 39 of file SymbolFileOnDemand.h.

References ID, and lldb_private::SymbolFile::isA().

◆ ParseBlocksRecursive()

size_t SymbolFileOnDemand::ParseBlocksRecursive ( lldb_private::Function func)
overridevirtual

◆ ParseCallEdgesInFunction()

std::vector< std::unique_ptr< lldb_private::CallEdge > > SymbolFileOnDemand::ParseCallEdgesInFunction ( UserID  func_id)
overridevirtual

◆ ParseDebugMacros()

bool SymbolFileOnDemand::ParseDebugMacros ( lldb_private::CompileUnit comp_unit)
overridevirtual

◆ ParseDeclsForContext()

void SymbolFileOnDemand::ParseDeclsForContext ( lldb_private::CompilerDeclContext  decl_ctx)
overridevirtual

◆ ParseFunctions()

size_t SymbolFileOnDemand::ParseFunctions ( lldb_private::CompileUnit comp_unit)
overridevirtual

◆ ParseImportedModules()

bool SymbolFileOnDemand::ParseImportedModules ( const lldb_private::SymbolContext sc,
std::vector< lldb_private::SourceModule > &  imported_modules 
)
overridevirtual

◆ ParseIsOptimized()

bool SymbolFileOnDemand::ParseIsOptimized ( lldb_private::CompileUnit comp_unit)
overridevirtual

◆ ParseLanguage()

lldb::LanguageType SymbolFileOnDemand::ParseLanguage ( lldb_private::CompileUnit comp_unit)
overridevirtual

◆ ParseLineTable()

bool SymbolFileOnDemand::ParseLineTable ( lldb_private::CompileUnit comp_unit)
overridevirtual

◆ ParseSupportFiles()

bool SymbolFileOnDemand::ParseSupportFiles ( lldb_private::CompileUnit comp_unit,
lldb_private::FileSpecList &  support_files 
)
override

Definition at line 116 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.

◆ ParseTypes()

size_t SymbolFileOnDemand::ParseTypes ( lldb_private::CompileUnit comp_unit)
overridevirtual

◆ ParseVariablesForContext()

size_t SymbolFileOnDemand::ParseVariablesForContext ( const lldb_private::SymbolContext sc)
overridevirtual

◆ ParseXcodeSDK()

XcodeSDK SymbolFileOnDemand::ParseXcodeSDK ( lldb_private::CompileUnit comp_unit)
overridevirtual

Return the Xcode SDK comp_unit was compiled against.

Reimplemented from lldb_private::SymbolFile.

Definition at line 60 of file SymbolFileOnDemand.cpp.

References GetLog(), lldb_private::XcodeSDK::GetString(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.

◆ PreloadSymbols()

void SymbolFileOnDemand::PreloadSymbols ( )
overridevirtual

◆ ResolveSymbolContext() [1/2]

uint32_t lldb_private::SymbolFileOnDemand::ResolveSymbolContext ( const lldb_private::Address so_addr,
lldb::SymbolContextItem  resolve_scope,
lldb_private::SymbolContext sc 
)
overridevirtual

◆ ResolveSymbolContext() [2/2]

uint32_t lldb_private::SymbolFileOnDemand::ResolveSymbolContext ( const lldb_private::SourceLocationSpec src_location_spec,
lldb::SymbolContextItem  resolve_scope,
lldb_private::SymbolContextList sc_list 
)
overridevirtual

Reimplemented from lldb_private::SymbolFile.

◆ ResolveTypeUID()

Type * SymbolFileOnDemand::ResolveTypeUID ( lldb::user_id_t  type_uid)
overridevirtual

◆ SectionFileAddressesChanged()

void lldb_private::SymbolFileOnDemand::SectionFileAddressesChanged ( )
inlineoverridevirtual

Notify the SymbolFile that the file addresses in the Sections for this module have been changed.

Implements lldb_private::SymbolFile.

Definition at line 206 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

◆ SetDebugInfoHadFrameVariableErrors()

void lldb_private::SymbolFileOnDemand::SetDebugInfoHadFrameVariableErrors ( )
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 225 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

◆ SetDebugInfoIndexWasLoadedFromCache()

void lldb_private::SymbolFileOnDemand::SetDebugInfoIndexWasLoadedFromCache ( )
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 213 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

◆ SetDebugInfoIndexWasSavedToCache()

void lldb_private::SymbolFileOnDemand::SetDebugInfoIndexWasSavedToCache ( )
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 219 of file SymbolFileOnDemand.h.

References m_sym_file_impl.

◆ SetLoadDebugInfoEnabled()

void SymbolFileOnDemand::SetLoadDebugInfoEnabled ( )
overridevirtual

Specify debug info should be loaded.

It will be no-op for most implementations except SymbolFileOnDemand.

Reimplemented from lldb_private::SymbolFile.

Definition at line 572 of file SymbolFileOnDemand.cpp.

References GetLog(), GetSymbolFileName(), InitializeObject(), LLDB_LOG, m_debug_info_enabled, m_preload_symbols, and PreloadSymbols().

Referenced by FindFunctions(), and FindGlobalVariables().

Member Data Documentation

◆ ID

char SymbolFileOnDemand::ID
staticprivate

LLVM RTTI support.

Definition at line 34 of file SymbolFileOnDemand.h.

Referenced by classof(), and isA().

◆ m_debug_info_enabled

bool lldb_private::SymbolFileOnDemand::m_debug_info_enabled = false
private

◆ m_preload_symbols

bool lldb_private::SymbolFileOnDemand::m_preload_symbols = false
private

Definition at line 238 of file SymbolFileOnDemand.h.

Referenced by PreloadSymbols(), and SetLoadDebugInfoEnabled().

◆ m_sym_file_impl

std::unique_ptr<SymbolFile> lldb_private::SymbolFileOnDemand::m_sym_file_impl
private

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