LLDB mainline
lldb_private::SymbolFileJSON Class Reference

#include <SymbolFileJSON.h>

Inheritance diagram for lldb_private::SymbolFileJSON:
[legend]

Public Member Functions

 SymbolFileJSON (lldb::ObjectFileSP objfile_sp)
llvm::StringRef GetPluginName () override
uint32_t CalculateAbilities () override
lldb::LanguageType ParseLanguage (CompileUnit &comp_unit) override
size_t ParseFunctions (CompileUnit &comp_unit) override
bool ParseLineTable (CompileUnit &comp_unit) override
bool ParseDebugMacros (CompileUnit &comp_unit) override
bool ParseSupportFiles (CompileUnit &comp_unit, SupportFileList &support_files) override
size_t ParseTypes (CompileUnit &cu) override
bool ParseImportedModules (const SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
size_t ParseBlocksRecursive (Function &func) override
size_t ParseVariablesForContext (const SymbolContext &sc) override
uint32_t CalculateNumCompileUnits () override
lldb::CompUnitSP ParseCompileUnitAtIndex (uint32_t index) override
TypeResolveTypeUID (lldb::user_id_t type_uid) override
std::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.
bool CompleteType (CompilerType &compiler_type) override
uint32_t ResolveSymbolContext (const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override
void GetTypes (lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list) override
void AddSymbols (Symtab &symtab) override
Public Member Functions inherited from lldb_private::SymbolFileCommon
 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.
SymtabGetSymtab (bool can_create=true) 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.
uint32_t GetNumCompileUnits () override
lldb::CompUnitSP GetCompileUnitAtIndex (uint32_t idx) override
llvm::Expected< lldb::TypeSystemSPGetTypeSystemForLanguage (lldb::LanguageType language) override
void Dump (Stream &s) override
uint64_t GetDebugInfoSize (bool load_all_debug_info=false) override
 Metrics gathering functions.
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
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
 This function is used to create types that belong to a SymbolFile.
lldb::TypeSP CopyType (const lldb::TypeSP &other_type) override
Public Member Functions inherited from lldb_private::SymbolFile
 SymbolFile ()=default
 ~SymbolFile () override=default
virtual SymbolFileGetBackingSymbolFile ()
 SymbolFileOnDemand class overrides this to return the underlying backing SymbolFile implementation that loads on-demand.
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 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 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 ParseIsOptimized (CompileUnit &comp_unit)
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< CompilerContextGetCompilerContextForUID (lldb::user_id_t uid)
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, llvm::StringRef filter, bool show_colors)
virtual void FindGlobalVariables (ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, VariableList &variables)
virtual void FindGlobalVariables (const RegularExpression &regex, 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 &regex, 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 llvm::Expected< SymbolContextResolveFunctionCallLabel (FunctionCallLabel &label)
 Resolves the function corresponding to the specified LLDB function call label.
virtual void PreloadSymbols ()
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 std::vector< std::unique_ptr< CallEdge > > ParseCallEdgesInFunction (UserID func_id)
virtual lldb::UnwindPlanSP GetUnwindPlan (const Address &address, const RegisterInfoResolver &resolver)
virtual llvm::Expected< lldb::addr_tGetParameterStackSize (Symbol &symbol)
 Return the number of stack bytes taken up by the parameters to this function.
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 void ResetStatistics ()
 Reset the statistics for the symbol file.
virtual ModuleList GetDebugInfoModules ()
 Get the additional modules that this symbol file uses to parse debug info.
virtual bool GetSeparateDebugInfo (StructuredData::Dictionary &d, bool errors_only, bool load_all_debug_info=false)
 Return true if separate debug info files are supported and this function succeeded, false otherwise.
virtual DWOStats GetDwoStats ()
 Retrieves statistics about DWO files associated with this symbol file.
std::unordered_map< lldb::CompUnitSP, ArgsGetCompileOptions ()
 Returns a map of compilation unit to the compile option arguments associated with that compilation unit.
std::string GetObjectName () const
Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
virtual ~PluginInterface ()=default
 PluginInterface (const PluginInterface &)=delete
PluginInterfaceoperator= (const PluginInterface &)=delete

Static Public Member Functions

static void Initialize ()
static void Terminate ()
static llvm::StringRef GetPluginNameStatic ()
static llvm::StringRef GetPluginDescriptionStatic ()
static lldb_private::SymbolFileCreateInstance (lldb::ObjectFileSP objfile_sp)
static bool classof (const SymbolFileCommon *obj)
Static Public Member Functions inherited from lldb_private::SymbolFile
static SymbolFileFindPlugin (lldb::ObjectFileSP objfile_sp)
static bool classof (const SymbolFile *obj)

Private Member Functions

lldb::addr_t GetBaseFileAddress ()

Private Attributes

std::vector< std::pair< uint64_t, std::string > > m_symbols

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)
}
Protected Member Functions inherited from lldb_private::SymbolFileCommon
virtual TypeListGetTypeList ()
void SetCompileUnitAtIndex (uint32_t idx, const lldb::CompUnitSP &cu_sp)
Protected Member Functions inherited from lldb_private::SymbolFile
void AssertModuleLock ()
virtual void GetCompileOptions (std::unordered_map< lldb::CompUnitSP, lldb_private::Args > &args)
Protected Attributes inherited from lldb_private::SymbolFileCommon
lldb::ObjectFileSP m_objfile_sp
std::optional< std::vector< lldb::CompUnitSP > > m_compile_units
TypeList m_type_list
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
bool m_debug_info_had_variable_errors = false
 Set to true if any variable feteching errors have been found when calling GetFrameVariableError().

Detailed Description

Definition at line 21 of file SymbolFileJSON.h.

Constructor & Destructor Documentation

◆ SymbolFileJSON()

SymbolFileJSON::SymbolFileJSON ( lldb::ObjectFileSP objfile_sp)

Definition at line 38 of file SymbolFileJSON.cpp.

References lldb_private::SymbolFileCommon::SymbolFileCommon().

Referenced by CreateInstance().

Member Function Documentation

◆ AddSymbols()

◆ CalculateAbilities()

uint32_t SymbolFileJSON::CalculateAbilities ( )
overridevirtual

◆ CalculateNumCompileUnits()

uint32_t lldb_private::SymbolFileJSON::CalculateNumCompileUnits ( )
inlineoverridevirtual

Implements lldb_private::SymbolFileCommon.

Definition at line 80 of file SymbolFileJSON.h.

◆ classof()

bool lldb_private::SymbolFileJSON::classof ( const SymbolFile * obj)
inlinestatic

Definition at line 31 of file SymbolFileJSON.h.

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

◆ CompleteType()

bool lldb_private::SymbolFileJSON::CompleteType ( CompilerType & compiler_type)
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 91 of file SymbolFileJSON.h.

◆ CreateInstance()

SymbolFile * SymbolFileJSON::CreateInstance ( lldb::ObjectFileSP objfile_sp)
static

Definition at line 54 of file SymbolFileJSON.cpp.

References SymbolFileJSON().

Referenced by Initialize(), and Terminate().

◆ GetBaseFileAddress()

lldb::addr_t lldb_private::SymbolFileJSON::GetBaseFileAddress ( )
private

◆ GetDynamicArrayInfoForUID()

std::optional< ArrayInfo > lldb_private::SymbolFileJSON::GetDynamicArrayInfoForUID ( lldb::user_id_t type_uid,
const lldb_private::ExecutionContext * exe_ctx )
inlineoverridevirtual

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 85 of file SymbolFileJSON.h.

◆ GetPluginDescriptionStatic()

llvm::StringRef SymbolFileJSON::GetPluginDescriptionStatic ( )
static

Definition at line 50 of file SymbolFileJSON.cpp.

Referenced by Initialize().

◆ GetPluginName()

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

Implements lldb_private::PluginInterface.

Definition at line 47 of file SymbolFileJSON.h.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

llvm::StringRef lldb_private::SymbolFileJSON::GetPluginNameStatic ( )
inlinestatic

Definition at line 40 of file SymbolFileJSON.h.

Referenced by GetPluginName(), and Initialize().

◆ GetTypes()

void SymbolFileJSON::GetTypes ( lldb_private::SymbolContextScope * sc_scope,
lldb::TypeClass type_mask,
lldb_private::TypeList & type_list )
overridevirtual

Implements lldb_private::SymbolFile.

Definition at line 84 of file SymbolFileJSON.cpp.

◆ Initialize()

void SymbolFileJSON::Initialize ( )
static

◆ isA()

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

LLVM RTTI support.

Reimplemented from lldb_private::SymbolFileCommon.

Definition at line 28 of file SymbolFileJSON.h.

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

◆ ParseBlocksRecursive()

size_t lldb_private::SymbolFileJSON::ParseBlocksRecursive ( Function & func)
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 74 of file SymbolFileJSON.h.

◆ ParseCompileUnitAtIndex()

CompUnitSP SymbolFileJSON::ParseCompileUnitAtIndex ( uint32_t index)
overridevirtual

Implements lldb_private::SymbolFileCommon.

Definition at line 82 of file SymbolFileJSON.cpp.

◆ ParseDebugMacros()

bool lldb_private::SymbolFileJSON::ParseDebugMacros ( CompileUnit & comp_unit)
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 59 of file SymbolFileJSON.h.

◆ ParseFunctions()

size_t lldb_private::SymbolFileJSON::ParseFunctions ( CompileUnit & comp_unit)
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 55 of file SymbolFileJSON.h.

◆ ParseImportedModules()

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

Implements lldb_private::SymbolFile.

Definition at line 68 of file SymbolFileJSON.h.

◆ ParseLanguage()

lldb::LanguageType lldb_private::SymbolFileJSON::ParseLanguage ( CompileUnit & comp_unit)
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 51 of file SymbolFileJSON.h.

References lldb::eLanguageTypeUnknown.

◆ ParseLineTable()

bool lldb_private::SymbolFileJSON::ParseLineTable ( CompileUnit & comp_unit)
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 57 of file SymbolFileJSON.h.

◆ ParseSupportFiles()

bool lldb_private::SymbolFileJSON::ParseSupportFiles ( CompileUnit & comp_unit,
SupportFileList & support_files )
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 61 of file SymbolFileJSON.h.

◆ ParseTypes()

size_t lldb_private::SymbolFileJSON::ParseTypes ( CompileUnit & cu)
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 66 of file SymbolFileJSON.h.

◆ ParseVariablesForContext()

size_t lldb_private::SymbolFileJSON::ParseVariablesForContext ( const SymbolContext & sc)
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 76 of file SymbolFileJSON.h.

◆ ResolveSymbolContext()

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

◆ ResolveTypeUID()

Type * lldb_private::SymbolFileJSON::ResolveTypeUID ( lldb::user_id_t type_uid)
inlineoverridevirtual

Implements lldb_private::SymbolFile.

Definition at line 84 of file SymbolFileJSON.h.

◆ Terminate()

void SymbolFileJSON::Terminate ( )
static

Member Data Documentation

◆ ID

char SymbolFileJSON::ID
staticprivate

LLVM RTTI support.

Definition at line 23 of file SymbolFileJSON.h.

Referenced by classof(), and isA().

◆ m_symbols

std::vector<std::pair<uint64_t, std::string> > lldb_private::SymbolFileJSON::m_symbols
private

Definition at line 106 of file SymbolFileJSON.h.


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