LLDB mainline
|
SymbolFileOnDemand wraps an actual SymbolFile by providing on demand symbol parsing/indexing to improve performance. More...
#include <SymbolFileOnDemand.h>
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. | |
void | SetLoadDebugInfoEnabled () override |
Specify debug info should be loaded. | |
uint32_t | GetNumCompileUnits () override |
lldb::CompUnitSP | GetCompileUnitAtIndex (uint32_t idx) override |
SymbolFile * | GetBackingSymbolFile () override |
SymbolFileOnDemand class overrides this to return the underlying backing SymbolFile implementation that loads on-demand. | |
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. | |
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. | |
void | InitializeObject () override |
Initialize the SymbolFile object. | |
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::SupportFileList &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::Type * | ResolveTypeUID (lldb::user_id_t type_uid) override |
std::optional< ArrayInfo > | GetDynamicArrayInfoForUID (lldb::user_id_t type_uid, const lldb_private::ExecutionContext *exe_ctx) override |
If type_uid points to an array type, return its characteristics. | |
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(). | |
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 ®ex, 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 ®ex, 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 (const lldb_private::TypeQuery &query, lldb_private::TypeResults &results) override |
Find types using a type-matching object that contains all search parameters. | |
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, bool only_root_namespaces) override |
Finds a namespace of name name and whose parent context is parent_decl_ctx. | |
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_t > | GetParameterStackSize (Symbol &symbol) override |
Return the number of stack bytes taken up by the parameters to this function. | |
void | PreloadSymbols () override |
uint64_t | GetDebugInfoSize (bool load_all_debug_info=false) override |
Metrics gathering functions. | |
lldb_private::StatsDuration::Duration | GetDebugInfoParseTime () override |
Return the time taken to parse the debug information. | |
lldb_private::StatsDuration::Duration | GetDebugInfoIndexTime () override |
Return the time it took to index the debug information in the object file. | |
uint32_t | GetAbilities () override |
Get a mask of what this symbol file supports for the object file that it was constructed with. | |
Symtab * | GetSymtab () override |
ObjectFile * | GetObjectFile () override |
const ObjectFile * | GetObjectFile () const override |
ObjectFile * | GetMainObjectFile () override |
void | SectionFileAddressesChanged () override |
Notify the SymbolFile that the file addresses in the Sections for this module have been changed. | |
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. | |
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. | |
void | SetDebugInfoHadFrameVariableErrors () override |
bool | GetSeparateDebugInfo (StructuredData::Dictionary &d, bool errors_only) override |
Return true if separate debug info files are supported and this function succeeded, false otherwise. | |
lldb::TypeSP | MakeType (lldb::user_id_t uid, ConstString name, std::optional< uint64_t > byte_size, SymbolContextScope *context, lldb::user_id_t encoding_uid, Type::EncodingDataType encoding_uid_type, const Declaration &decl, const CompilerType &compiler_qual_type, Type::ResolveState compiler_type_resolve_state, uint32_t opaque_payload=0) override |
lldb::TypeSP | CopyType (const lldb::TypeSP &other_type) override |
Public Member Functions inherited from lldb_private::SymbolFile | |
SymbolFile ()=default | |
~SymbolFile () override=default | |
virtual SymbolFile * | GetBackingSymbolFile () |
SymbolFileOnDemand class overrides this to return the underlying backing SymbolFile implementation that loads on-demand. | |
virtual uint32_t | GetAbilities ()=0 |
Get a mask of what this symbol file supports for the object file that it was constructed with. | |
virtual uint32_t | CalculateAbilities ()=0 |
virtual std::recursive_mutex & | GetModuleMutex () const |
Symbols file subclasses should override this to return the Module that owns the TypeSystem that this symbol file modifies type information in. | |
virtual void | InitializeObject () |
Initialize the SymbolFile object. | |
virtual bool | GetLoadDebugInfoEnabled () |
Whether debug info will be loaded or not. | |
virtual void | SetLoadDebugInfoEnabled () |
Specify debug info should be loaded. | |
virtual uint32_t | GetNumCompileUnits ()=0 |
virtual lldb::CompUnitSP | GetCompileUnitAtIndex (uint32_t idx)=0 |
virtual Symtab * | GetSymtab ()=0 |
virtual lldb::LanguageType | ParseLanguage (CompileUnit &comp_unit)=0 |
virtual XcodeSDK | ParseXcodeSDK (CompileUnit &comp_unit) |
Return the Xcode SDK comp_unit was compiled against. | |
virtual llvm::SmallSet< lldb::LanguageType, 4 > | ParseAllLanguages (CompileUnit &comp_unit) |
This function exists because SymbolFileDWARFDebugMap may extra compile units which aren't exposed as "real" compile units. | |
virtual size_t | ParseFunctions (CompileUnit &comp_unit)=0 |
virtual bool | ParseLineTable (CompileUnit &comp_unit)=0 |
virtual bool | ParseDebugMacros (CompileUnit &comp_unit)=0 |
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 . | |
virtual bool | ParseSupportFiles (CompileUnit &comp_unit, SupportFileList &support_files)=0 |
virtual size_t | ParseTypes (CompileUnit &comp_unit)=0 |
virtual bool | ParseIsOptimized (CompileUnit &comp_unit) |
virtual bool | ParseImportedModules (const SymbolContext &sc, std::vector< SourceModule > &imported_modules)=0 |
virtual size_t | ParseBlocksRecursive (Function &func)=0 |
virtual size_t | ParseVariablesForContext (const SymbolContext &sc)=0 |
virtual Type * | ResolveTypeUID (lldb::user_id_t type_uid)=0 |
virtual std::optional< ArrayInfo > | GetDynamicArrayInfoForUID (lldb::user_id_t type_uid, const lldb_private::ExecutionContext *exe_ctx)=0 |
If type_uid points to an array type, return its characteristics. | |
virtual bool | CompleteType (CompilerType &compiler_type)=0 |
virtual void | ParseDeclsForContext (CompilerDeclContext decl_ctx) |
virtual CompilerDecl | GetDeclForUID (lldb::user_id_t uid) |
virtual CompilerDeclContext | GetDeclContextForUID (lldb::user_id_t uid) |
virtual CompilerDeclContext | GetDeclContextContainingUID (lldb::user_id_t uid) |
virtual std::vector< CompilerContext > | GetCompilerContextForUID (lldb::user_id_t uid) |
virtual uint32_t | ResolveSymbolContext (const Address &so_addr, lldb::SymbolContextItem resolve_scope, SymbolContext &sc)=0 |
Status | GetFrameVariableError (StackFrame &frame) |
Get an error that describes why variables might be missing for a given symbol context. | |
virtual Status | CalculateFrameVariableError (StackFrame &frame) |
Subclasses will override this function to for GetFrameVariableError(). | |
virtual uint32_t | ResolveSymbolContext (const SourceLocationSpec &src_location_spec, lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) |
virtual void | DumpClangAST (Stream &s) |
virtual void | FindGlobalVariables (ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, VariableList &variables) |
virtual void | FindGlobalVariables (const RegularExpression ®ex, uint32_t max_matches, VariableList &variables) |
virtual void | FindFunctions (const Module::LookupInfo &lookup_info, const CompilerDeclContext &parent_decl_ctx, bool include_inlines, SymbolContextList &sc_list) |
virtual void | FindFunctions (const RegularExpression ®ex, bool include_inlines, SymbolContextList &sc_list) |
virtual void | FindTypes (const TypeQuery &query, TypeResults &results) |
Find types using a type-matching object that contains all search parameters. | |
virtual void | GetMangledNamesForFunction (const std::string &scope_qualified_name, std::vector< ConstString > &mangled_names) |
virtual void | GetTypes (lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list)=0 |
virtual void | PreloadSymbols () |
virtual llvm::Expected< lldb::TypeSystemSP > | GetTypeSystemForLanguage (lldb::LanguageType language)=0 |
virtual CompilerDeclContext | FindNamespace (ConstString name, const CompilerDeclContext &parent_decl_ctx, bool only_root_namespaces=false) |
Finds a namespace of name name and whose parent context is parent_decl_ctx. | |
virtual ObjectFile * | GetObjectFile ()=0 |
virtual const ObjectFile * | GetObjectFile () const =0 |
virtual ObjectFile * | GetMainObjectFile ()=0 |
virtual std::vector< std::unique_ptr< CallEdge > > | ParseCallEdgesInFunction (UserID func_id) |
virtual void | AddSymbols (Symtab &symtab) |
virtual void | SectionFileAddressesChanged ()=0 |
Notify the SymbolFile that the file addresses in the Sections for this module have been changed. | |
virtual lldb::UnwindPlanSP | GetUnwindPlan (const Address &address, const RegisterInfoResolver &resolver) |
virtual llvm::Expected< lldb::addr_t > | GetParameterStackSize (Symbol &symbol) |
Return the number of stack bytes taken up by the parameters to this function. | |
virtual void | Dump (Stream &s)=0 |
virtual uint64_t | GetDebugInfoSize (bool load_all_debug_info=false)=0 |
Metrics gathering functions. | |
virtual StatsDuration::Duration | GetDebugInfoParseTime () |
Return the time taken to parse the debug information. | |
virtual StatsDuration::Duration | GetDebugInfoIndexTime () |
Return the time it took to index the debug information in the object file. | |
virtual ModuleList | GetDebugInfoModules () |
Get the additional modules that this symbol file uses to parse debug info. | |
virtual bool | GetDebugInfoHadFrameVariableErrors () const =0 |
Accessors for the bool that indicates if there was debug info, but errors stopped variables from being able to be displayed correctly. | |
virtual void | SetDebugInfoHadFrameVariableErrors ()=0 |
virtual bool | GetSeparateDebugInfo (StructuredData::Dictionary &d, bool errors_only) |
Return true if separate debug info files are supported and this function succeeded, false otherwise. | |
virtual lldb::TypeSP | MakeType (lldb::user_id_t uid, ConstString name, std::optional< uint64_t > byte_size, SymbolContextScope *context, lldb::user_id_t encoding_uid, Type::EncodingDataType encoding_uid_type, const Declaration &decl, const CompilerType &compiler_qual_type, Type::ResolveState compiler_type_resolve_state, uint32_t opaque_payload=0)=0 |
virtual lldb::TypeSP | CopyType (const lldb::TypeSP &other_type)=0 |
std::unordered_map< lldb::CompUnitSP, Args > | GetCompileOptions () |
Returns a map of compilation unit to the compile option arguments associated with that compilation unit. | |
Public Member Functions inherited from lldb_private::PluginInterface | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
virtual llvm::StringRef | GetPluginName ()=0 |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Private Member Functions | |
Log * | GetLog () const |
ConstString | GetSymbolFileName () |
Private Attributes | |
bool | m_debug_info_enabled = false |
bool | m_preload_symbols = false |
std::unique_ptr< SymbolFile > | m_sym_file_impl |
Static Private Attributes | |
static char | ID |
LLVM RTTI support. | |
bool | isA (const void *ClassID) const override |
LLVM RTTI support. | |
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 SymbolFile * | FindPlugin (lldb::ObjectFileSP objfile_sp) |
static bool | classof (const SymbolFile *obj) |
Protected Member Functions inherited from lldb_private::SymbolFile | |
void | AssertModuleLock () |
virtual void | GetCompileOptions (std::unordered_map< lldb::CompUnitSP, lldb_private::Args > &args) |
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 33 of file SymbolFileOnDemand.h.
SymbolFileOnDemand::SymbolFileOnDemand | ( | std::unique_ptr< SymbolFile > && | symbol_file | ) |
Definition at line 22 of file SymbolFileOnDemand.cpp.
|
overridedefault |
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 28 of file SymbolFileOnDemand.cpp.
References m_sym_file_impl.
|
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 278 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
inlinestatic |
Definition at line 43 of file SymbolFileOnDemand.h.
References ID, and lldb_private::SymbolFile::isA().
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 212 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 241 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 299 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 308 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 387 of file SymbolFileOnDemand.cpp.
References lldb_private::Symtab::FindFunctionSymbols(), GetLog(), lldb_private::Module::LookupInfo::GetLookupName(), lldb_private::Module::LookupInfo::GetNameTypeMask(), lldb_private::SymbolContextList::GetSize(), GetSymbolFileName(), GetSymtab(), LLDB_LOG, m_debug_info_enabled, m_sym_file_impl, and SetLoadDebugInfoEnabled().
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 357 of file SymbolFileOnDemand.cpp.
References lldb_private::Symtab::AppendSymbolIndexesMatchingRegExAndType(), lldb_private::Symtab::eDebugAny, lldb::eSymbolTypeAny, lldb_private::Symtab::eVisibilityAny, GetLog(), GetSymbolFileName(), GetSymtab(), LLDB_LOG, m_debug_info_enabled, m_sym_file_impl, and SetLoadDebugInfoEnabled().
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 317 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 328 of file SymbolFileOnDemand.cpp.
References lldb_private::Symtab::eDebugAny, lldb::eSymbolTypeData, lldb_private::Symtab::eVisibilityAny, lldb_private::Symtab::FindFirstSymbolWithNameAndType(), GetLog(), GetSymbolFileName(), GetSymtab(), LLDB_LOG, m_debug_info_enabled, m_sym_file_impl, and SetLoadDebugInfoEnabled().
|
overridevirtual |
Finds a namespace of name name and whose parent context is parent_decl_ctx.
If
then this function will consider all namespaces that match the name. If only_root_namespaces is true, only consider in the search those DIEs that represent top-level namespaces.
Reimplemented from lldb_private::SymbolFile.
Definition at line 467 of file SymbolFileOnDemand.cpp.
References lldb_private::SymbolFile::FindNamespace(), GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Find types using a type-matching object that contains all search parameters.
[in] | query | A type matching object that contains all of the details of the type search. |
[in] | results | Any matching types will be populated into the results object using TypeMap::InsertUnique(...). |
Reimplemented from lldb_private::SymbolFile.
Definition at line 434 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
override |
Definition at line 103 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
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.
Implements lldb_private::SymbolFile.
Definition at line 580 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
inlineoverridevirtual |
SymbolFileOnDemand class overrides this to return the underlying backing SymbolFile implementation that loads on-demand.
Reimplemented from lldb_private::SymbolFile.
Definition at line 59 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 574 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.
|
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 215 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
overridevirtual |
Return the time it took to index the debug information in the object file.
Reimplemented from lldb_private::SymbolFile.
Definition at line 551 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.
|
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 203 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 209 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
overridevirtual |
Return the time taken to parse the debug information.
Reimplemented from lldb_private::SymbolFile.
Definition at line 544 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.
|
overridevirtual |
Metrics gathering functions.
Return the size in bytes of all loaded debug information or total possible debug info 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.
load_all_debug_info | If true, force loading any symbol files if they are not yet loaded and add to the total size. Default to false. |
Implements lldb_private::SymbolFile.
Definition at line 537 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 248 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 238 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 221 of file SymbolFileOnDemand.cpp.
References GetLog(), lldb_private::CompilerDecl::GetName(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
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 202 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
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 52 of file SymbolFileOnDemand.h.
References m_debug_info_enabled.
|
inlineprivate |
Definition at line 246 of file SymbolFileOnDemand.h.
References lldb_private::OnDemand.
Referenced by CalculateFrameVariableError(), CompleteType(), Dump(), DumpClangAST(), FindFunctions(), FindGlobalVariables(), FindNamespace(), FindTypes(), ForEachExternalModule(), GetAbilities(), GetCompileUnitAtIndex(), GetDebugInfoIndexTime(), GetDebugInfoParseTime(), GetDebugInfoSize(), GetDeclContextContainingUID(), GetDeclContextForUID(), GetDeclForUID(), GetDynamicArrayInfoForUID(), GetMangledNamesForFunction(), GetNumCompileUnits(), GetParameterStackSize(), GetTypes(), GetTypeSystemForLanguage(), GetUnwindPlan(), InitializeObject(), ParseBlocksRecursive(), ParseCallEdgesInFunction(), ParseDebugMacros(), ParseDeclsForContext(), ParseFunctions(), ParseImportedModules(), ParseIsOptimized(), ParseLanguage(), ParseLineTable(), ParseSupportFiles(), ParseTypes(), ParseVariablesForContext(), ParseXcodeSDK(), PreloadSymbols(), ResolveTypeUID(), and SetLoadDebugInfoEnabled().
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 195 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 421 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
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 34 of file SymbolFileOnDemand.cpp.
References m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 568 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 192 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 189 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
Referenced by GetSymbolFileName().
|
overridevirtual |
Return the number of stack bytes taken up by the parameters to this function.
Reimplemented from lldb_private::SymbolFile.
Definition at line 510 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.
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 50 of file SymbolFileOnDemand.h.
|
inlineoverridevirtual |
Return true if separate debug info files are supported and this function succeeded, false otherwise.
[out] | d | If this function succeeded, then this will be a dictionary that contains the keys "type", "symfile", and "separate-debug-info-files". "type" can be used to assume the structure of each object in "separate-debug-info-files". |
errors_only | If true, then only return separate debug info files that encountered errors during loading. If false, then return all expected separate debug info files, regardless of whether they were successfully loaded. |
Reimplemented from lldb_private::SymbolFile.
Definition at line 222 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
inlineprivate |
Definition at line 248 of file SymbolFileOnDemand.h.
References lldb_private::FileSpec::GetFilename(), lldb_private::ObjectFile::GetFileSpec(), and GetObjectFile().
Referenced by CalculateFrameVariableError(), CompleteType(), Dump(), DumpClangAST(), FindFunctions(), FindGlobalVariables(), FindNamespace(), FindTypes(), ForEachExternalModule(), GetAbilities(), GetCompileUnitAtIndex(), GetDebugInfoIndexTime(), GetDebugInfoParseTime(), GetDebugInfoSize(), GetDeclContextContainingUID(), GetDeclContextForUID(), GetDeclForUID(), GetDynamicArrayInfoForUID(), GetMangledNamesForFunction(), GetNumCompileUnits(), GetParameterStackSize(), GetTypes(), GetTypeSystemForLanguage(), GetUnwindPlan(), InitializeObject(), ParseBlocksRecursive(), ParseCallEdgesInFunction(), ParseDebugMacros(), ParseDeclsForContext(), ParseFunctions(), ParseImportedModules(), ParseIsOptimized(), ParseLanguage(), ParseLineTable(), ParseSupportFiles(), ParseTypes(), ParseVariablesForContext(), ParseXcodeSDK(), PreloadSymbols(), ResolveTypeUID(), and SetLoadDebugInfoEnabled().
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 187 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
Referenced by FindFunctions(), and FindGlobalVariables().
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 444 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 455 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 499 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
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 38 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
Referenced by SetLoadDebugInfoEnabled().
|
inlineoverridevirtual |
LLVM RTTI support.
Reimplemented from lldb_private::SymbolFile.
Definition at line 40 of file SymbolFileOnDemand.h.
References ID, and lldb_private::SymbolFile::isA().
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 227 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 169 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 481 of file SymbolFileOnDemand.cpp.
References lldb_private::UserID::GetID(), GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 94 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 257 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 76 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 150 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 126 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 47 of file SymbolFileOnDemand.cpp.
References lldb::eLanguageTypeUnknown, GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 85 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 117 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, and m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 141 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 178 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Return the Xcode SDK comp_unit was compiled against.
Reimplemented from lldb_private::SymbolFile.
Definition at line 61 of file SymbolFileOnDemand.cpp.
References GetLog(), lldb_private::XcodeSDK::GetString(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
Definition at line 527 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, m_preload_symbols, and m_sym_file_impl.
Referenced by SetLoadDebugInfoEnabled().
|
overridevirtual |
Implements lldb_private::SymbolFile.
|
overridevirtual |
Reimplemented from lldb_private::SymbolFile.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 187 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), LLDB_LOG, m_debug_info_enabled, and m_sym_file_impl.
|
inlineoverridevirtual |
Notify the SymbolFile that the file addresses in the Sections for this module have been changed.
Implements lldb_private::SymbolFile.
Definition at line 199 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 218 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 206 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 212 of file SymbolFileOnDemand.h.
References m_sym_file_impl.
|
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 558 of file SymbolFileOnDemand.cpp.
References GetLog(), GetSymbolFileName(), InitializeObject(), LLDB_LOG, m_debug_info_enabled, m_preload_symbols, and PreloadSymbols().
Referenced by FindFunctions(), and FindGlobalVariables().
|
staticprivate |
LLVM RTTI support.
Definition at line 35 of file SymbolFileOnDemand.h.
|
private |
Definition at line 253 of file SymbolFileOnDemand.h.
Referenced by CalculateFrameVariableError(), CompleteType(), Dump(), DumpClangAST(), FindFunctions(), FindGlobalVariables(), FindNamespace(), FindTypes(), ForEachExternalModule(), GetAbilities(), GetDeclContextContainingUID(), GetDeclContextForUID(), GetDeclForUID(), GetDynamicArrayInfoForUID(), GetLoadDebugInfoEnabled(), GetMangledNamesForFunction(), GetParameterStackSize(), GetTypes(), GetTypeSystemForLanguage(), GetUnwindPlan(), InitializeObject(), ParseBlocksRecursive(), ParseCallEdgesInFunction(), ParseDebugMacros(), ParseDeclsForContext(), ParseFunctions(), ParseImportedModules(), ParseIsOptimized(), ParseLanguage(), ParseLineTable(), ParseTypes(), ParseVariablesForContext(), ParseXcodeSDK(), PreloadSymbols(), ResolveTypeUID(), and SetLoadDebugInfoEnabled().
|
private |
Definition at line 254 of file SymbolFileOnDemand.h.
Referenced by PreloadSymbols(), and SetLoadDebugInfoEnabled().
|
private |
Definition at line 255 of file SymbolFileOnDemand.h.
Referenced by CalculateAbilities(), CalculateFrameVariableError(), CompleteType(), CopyType(), Dump(), DumpClangAST(), FindFunctions(), FindGlobalVariables(), FindNamespace(), FindTypes(), ForEachExternalModule(), GetAbilities(), GetBackingSymbolFile(), GetCompileUnitAtIndex(), GetDebugInfoHadFrameVariableErrors(), GetDebugInfoIndexTime(), GetDebugInfoIndexWasLoadedFromCache(), GetDebugInfoIndexWasSavedToCache(), GetDebugInfoParseTime(), GetDebugInfoSize(), GetDeclContextContainingUID(), GetDeclContextForUID(), GetDeclForUID(), GetDynamicArrayInfoForUID(), GetMainObjectFile(), GetMangledNamesForFunction(), GetModuleMutex(), GetNumCompileUnits(), GetObjectFile(), GetParameterStackSize(), GetSeparateDebugInfo(), GetSymtab(), GetTypes(), GetTypeSystemForLanguage(), GetUnwindPlan(), InitializeObject(), MakeType(), ParseBlocksRecursive(), ParseCallEdgesInFunction(), ParseDebugMacros(), ParseDeclsForContext(), ParseFunctions(), ParseImportedModules(), ParseIsOptimized(), ParseLanguage(), ParseLineTable(), ParseSupportFiles(), ParseTypes(), ParseVariablesForContext(), ParseXcodeSDK(), PreloadSymbols(), ResolveTypeUID(), SectionFileAddressesChanged(), SetDebugInfoHadFrameVariableErrors(), SetDebugInfoIndexWasLoadedFromCache(), and SetDebugInfoIndexWasSavedToCache().