LLDB
mainline
|
Containing protected virtual methods for child classes to override. More...
#include <SymbolFile.h>
Public Member Functions | |
SymbolFileCommon (lldb::ObjectFileSP objfile_sp) | |
~SymbolFileCommon () override=default | |
uint32_t | GetAbilities () override |
Get a mask of what this symbol file supports for the object file that it was constructed with. More... | |
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. More... | |
uint32_t | GetNumCompileUnits () override |
lldb::CompUnitSP | GetCompileUnitAtIndex (uint32_t idx) override |
llvm::Expected< lldb_private::TypeSystem & > | GetTypeSystemForLanguage (lldb::LanguageType language) override |
void | Dump (Stream &s) override |
uint64_t | GetDebugInfoSize () override |
Metrics gathering functions. 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 |
![]() | |
SymbolFile ()=default | |
~SymbolFile () override=default | |
virtual SymbolFile * | GetBackingSymbolFile () |
SymbolFileOnDemand class overrides this to return the underlying backing SymbolFile implementation that loads on-demand. More... | |
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. More... | |
virtual void | InitializeObject () |
Initialize the SymbolFile object. More... | |
virtual bool | GetLoadDebugInfoEnabled () |
Whether debug info will be loaded or not. More... | |
virtual void | SetLoadDebugInfoEnabled () |
Specify debug info should be loaded. More... | |
virtual lldb::LanguageType | ParseLanguage (CompileUnit &comp_unit)=0 |
virtual XcodeSDK | ParseXcodeSDK (CompileUnit &comp_unit) |
Return the Xcode SDK comp_unit was compiled against. More... | |
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 . More... | |
virtual bool | ParseSupportFiles (CompileUnit &comp_unit, FileSpecList &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 llvm::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. More... | |
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 uint32_t | ResolveSymbolContext (const Address &so_addr, lldb::SymbolContextItem resolve_scope, SymbolContext &sc)=0 |
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 (ConstString name, const CompilerDeclContext &parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool include_inlines, SymbolContextList &sc_list) |
virtual void | FindFunctions (const RegularExpression ®ex, bool include_inlines, SymbolContextList &sc_list) |
virtual void | FindTypes (ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, llvm::DenseSet< lldb_private::SymbolFile * > &searched_symbol_files, TypeMap &types) |
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 | 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 CompilerDeclContext | FindNamespace (ConstString name, const CompilerDeclContext &parent_decl_ctx) |
virtual std::vector< std::unique_ptr< CallEdge > > | ParseCallEdgesInFunction (UserID func_id) |
virtual void | AddSymbols (Symtab &symtab) |
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. More... | |
virtual StatsDuration::Duration | GetDebugInfoParseTime () |
Return the time taken to parse the debug information. More... | |
virtual StatsDuration::Duration | GetDebugInfoIndexTime () |
Return the time it took to index the debug information in the object file. More... | |
virtual ModuleList | GetDebugInfoModules () |
Get the additional modules that this symbol file uses to parse debug info. More... | |
![]() | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
virtual llvm::StringRef | GetPluginName ()=0 |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Protected Member Functions | |
virtual uint32_t | CalculateNumCompileUnits ()=0 |
virtual lldb::CompUnitSP | ParseCompileUnitAtIndex (uint32_t idx)=0 |
virtual TypeList & | GetTypeList () |
void | SetCompileUnitAtIndex (uint32_t idx, const lldb::CompUnitSP &cu_sp) |
![]() | |
void | AssertModuleLock () |
Protected Attributes | |
lldb::ObjectFileSP | m_objfile_sp |
llvm::Optional< std::vector< lldb::CompUnitSP > > | m_compile_units |
TypeList | m_type_list |
Symtab * | m_symtab = nullptr |
uint32_t | m_abilities = 0 |
bool | m_calculated_abilities = false |
bool | m_index_was_loaded_from_cache = false |
bool | m_index_was_saved_to_cache = false |
Private Member Functions | |
SymbolFileCommon (const SymbolFileCommon &)=delete | |
const SymbolFileCommon & | operator= (const SymbolFileCommon &)=delete |
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 SymbolFileCommon *obj) |
Additional Inherited Members | |
![]() | |
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 SymbolFile * | FindPlugin (lldb::ObjectFileSP objfile_sp) |
static bool | classof (const SymbolFile *obj) |
Containing protected virtual methods for child classes to override.
Most actual SymbolFile implementations should inherit from this class.
Definition at line 374 of file SymbolFile.h.
|
inline |
Definition at line 388 of file SymbolFile.h.
|
overridedefault |
|
privatedelete |
|
protectedpure virtual |
|
inlinestatic |
Definition at line 384 of file SymbolFile.h.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Reimplemented in SymbolFileDWARF.
Definition at line 253 of file SymbolFile.cpp.
References lldb_private::eSortOrderNone, lldb_private::Stream::Format(), lldb_private::Stream::PutChar(), and lldb_private::Stream::PutCString().
|
inlineoverridevirtual |
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 393 of file SymbolFile.h.
References lldb_private::SymbolFile::CalculateAbilities(), m_abilities, and m_calculated_abilities.
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 204 of file SymbolFile.cpp.
Referenced by SymbolFileDWARF::GetDWOId().
|
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 425 of file SymbolFile.h.
References m_index_was_loaded_from_cache.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 431 of file SymbolFile.h.
References m_index_was_saved_to_cache.
|
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.
Reimplemented in lldb_private::breakpad::SymbolFileBreakpad, and lldb_private::npdb::SymbolFileNativePDB.
Definition at line 241 of file SymbolFile.cpp.
References lldb_private::SectionList::GetDebugInfoSize().
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 181 of file SymbolFile.cpp.
References lldb_private::ModuleChild::GetModule().
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 194 of file SymbolFile.cpp.
Referenced by SymbolFileDWARFDebugMap::CalculateAbilities(), SymbolFileDWARFDebugMap::GetCompileUnit(), SymbolFilePDB::GetCompileUnitIndex(), SymbolFileDWARFDebugMap::GetCompileUnitInfo(), SymbolFileDWARFDebugMap::GetCompUnitInfo(), SymbolFileDWARFDebugMap::GetCompUnitInfosForModule(), SymbolFileDWARF::GetDWOId(), SymbolFileDWARFDebugMap::GetModuleByOSOIndex(), SymbolFilePDB::GetTypes(), SymbolFilePDB::ParseCompileUnitAtIndex(), lldb_private::npdb::SymbolFileNativePDB::ParseCompileUnitAtIndex(), SymbolFileDWARFDebugMap::ParseCompileUnitAtIndex(), lldb_private::npdb::SymbolFileNativePDB::ResolveSymbolContext(), SymbolFileDWARFDebugMap::SetCompileUnit(), SymbolFileDWARF::Supports_DW_AT_APPLE_objc_complete_type(), and SymbolFileDWARF::UpdateExternalModuleListIfNeeded().
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 404 of file SymbolFile.h.
References m_objfile_sp.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 403 of file SymbolFile.h.
References m_objfile_sp.
Referenced by SymbolFilePDB::CompleteType(), SymbolFileDWARF::CompleteType(), lldb_private::npdb::SymbolFileNativePDB::CreateConstantSymbol(), lldb_private::npdb::SymbolFileNativePDB::CreateGlobalVariable(), lldb_private::npdb::SymbolFileNativePDB::CreateLocalVariable(), SymbolFileDWARF::DeclContextMatchesThisSymbolFile(), DWARFDebugInfoEntry::Extract(), SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(), SymbolFileDWARF::FindFunctions(), SymbolFileDWARF::FindGlobalVariables(), SymbolFileDWARF::FindNamespace(), DWARFUnit::GetByteOrder(), SymbolFileDWARFDebugMap::GetDebugInfoModules(), DWARFUnit::GetDIE(), SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(), SymbolFileDWARF::GetDwpSymbolFile(), SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(), SymbolFileDWARF::GetGlobalAranges(), SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo(), SymbolFileDWARF::GetModuleMutex(), GetRangesOrReportError(), DWARFUnit::GetRnglistData(), DWARFUnit::GetRnglistTable(), SymbolFileDWARF::GetTypeForDIE(), SymbolFileDWARF::GetTypeUnitSupportFiles(), SymbolFileDWARF::InitializeObject(), SymbolFileDWARFDebugMap::LinkOSOAddress(), SymbolFileDWARF::ParseAndAppendGlobalVariable(), SymbolFileDWARF::ParseBlocksRecursive(), SymbolFileDWARF::ParseCallEdgesInFunction(), DWARFASTParserClang::ParseChildMembers(), SymbolFilePDB::ParseCompileUnitFunctionForPDBFunc(), DWARFASTParserClang::ParseObjCProperty(), DWARFASTParserClang::ParseSingleMember(), SymbolFileDWARF::ParseVariableDIE(), SymbolFilePDB::ParseVariableForPDBData(), PrepareContextToReceiveMembers(), DWARFFormValue::Reference(), SymbolFileDWARF::ResolveType(), SymbolFileDWARF::ResolveTypeUID(), DWARFUnit::SetLoclistsBase(), and SymbolFileDWARF::UpdateExternalModuleListIfNeeded().
|
overridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 166 of file SymbolFile.cpp.
Referenced by SymbolFileDWARF::PreloadSymbols().
|
inlineprotectedvirtual |
Reimplemented in SymbolFileDWARF.
Definition at line 441 of file SymbolFile.h.
References m_type_list.
Referenced by lldb_private::npdb::SymbolFileNativePDB::GetOrCreateType(), lldb_private::npdb::SymbolFileNativePDB::ParseTypes(), and SymbolFilePDB::ResolveTypeUID().
|
overridevirtual |
Implements lldb_private::SymbolFile.
Reimplemented in SymbolFileDWARF, SymbolFilePDB, lldb_private::npdb::SymbolFileNativePDB, lldb_private::breakpad::SymbolFileBreakpad, and SymbolFileDWARFDwo.
Definition at line 232 of file SymbolFile.cpp.
|
inlineoverridevirtual |
LLVM RTTI support.
Reimplemented from lldb_private::SymbolFile.
Reimplemented in SymbolFileDWARF, lldb_private::npdb::SymbolFileNativePDB, SymbolFileDWARFDebugMap, SymbolFilePDB, lldb_private::breakpad::SymbolFileBreakpad, SymbolFileSymtab, and SymbolFileDWARFDwo.
Definition at line 381 of file SymbolFile.h.
References ID, and lldb_private::SymbolFile::isA().
Referenced by classof(), lldb_private::breakpad::SymbolFileBreakpad::isA(), and lldb_private::npdb::SymbolFileNativePDB::isA().
|
privatedelete |
|
protectedpure virtual |
|
overridevirtual |
Notify the SymbolFile that the file addresses in the Sections for this module have been changed.
Implements lldb_private::SymbolFile.
Definition at line 185 of file SymbolFile.cpp.
References lldb_private::ObjectFile::SectionFileAddressesChanged().
|
protected |
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 428 of file SymbolFile.h.
References m_index_was_loaded_from_cache.
|
inlineoverridevirtual |
Implements lldb_private::SymbolFile.
Definition at line 434 of file SymbolFile.h.
References m_index_was_saved_to_cache.
|
staticprivate |
|
protected |
Definition at line 451 of file SymbolFile.h.
Referenced by GetAbilities().
|
protected |
Definition at line 452 of file SymbolFile.h.
Referenced by GetAbilities().
|
protected |
Definition at line 448 of file SymbolFile.h.
|
protected |
Definition at line 453 of file SymbolFile.h.
Referenced by GetDebugInfoIndexWasLoadedFromCache(), and SetDebugInfoIndexWasLoadedFromCache().
|
protected |
Definition at line 454 of file SymbolFile.h.
Referenced by GetDebugInfoIndexWasSavedToCache(), and SetDebugInfoIndexWasSavedToCache().
|
protected |
Definition at line 444 of file SymbolFile.h.
Referenced by SymbolFilePDB::AddSymbols(), SymbolFileSymtab::CalculateAbilities(), SymbolFilePDB::CalculateAbilities(), lldb_private::npdb::SymbolFileNativePDB::CalculateAbilities(), SymbolFileDWARF::CalculateAbilities(), lldb_private::npdb::SymbolFileNativePDB::CreateCompileUnit(), SymbolFileDWARFDebugMap::FindCompleteObjCDefinitionTypeForDIE(), SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE(), SymbolFilePDB::FindGlobalVariables(), SymbolFileDWARF::FindGlobalVariables(), SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(), SymbolFileDWARF::GetDwpSymbolFile(), SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo(), SymbolFileDWARF::GetObjCClassSymbol(), GetObjectFile(), lldb_private::npdb::SymbolFileNativePDB::GetTypeSystemForLanguage(), SymbolFilePDB::GetTypeSystemForLanguage(), SymbolFileDWARF::GetTypeSystemForLanguage(), SymbolFileDWARF::InitializeFirstCodeAddress(), SymbolFilePDB::InitializeObject(), lldb_private::npdb::SymbolFileNativePDB::InitializeObject(), SymbolFileDWARFDebugMap::InitOSO(), SymbolFileDWARF::LoadSectionData(), SymbolFileDWARF::ParseCompileUnit(), SymbolFileSymtab::ParseCompileUnitAtIndex(), SymbolFileDWARFDebugMap::ParseCompileUnitAtIndex(), SymbolFilePDB::ParseCompileUnitForUID(), SymbolFileSymtab::ParseFunctions(), SymbolFileDWARF::ParseImportedModules(), SymbolFileDWARF::ParseXcodeSDK(), SymbolFileSymtab::ResolveSymbolContext(), and SymbolFileDWARF::UpdateExternalModuleListIfNeeded().
|
protected |
Definition at line 450 of file SymbolFile.h.
|
protected |
Definition at line 449 of file SymbolFile.h.
Referenced by GetTypeList().