LLDB  mainline
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Private Attributes | List of all members
SymbolFileSymtab Class Reference

#include <SymbolFileSymtab.h>

Inheritance diagram for SymbolFileSymtab:
Inheritance graph
[legend]
Collaboration diagram for SymbolFileSymtab:
Collaboration graph
[legend]

Public Member Functions

 SymbolFileSymtab (lldb::ObjectFileSP objfile_sp)
 
uint32_t CalculateAbilities () override
 
lldb::LanguageType ParseLanguage (lldb_private::CompileUnit &comp_unit) override
 
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 ParseSupportFiles (lldb_private::CompileUnit &comp_unit, lldb_private::FileSpecList &support_files) 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
 
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
 
lldb_private::ConstString GetPluginName () override
 
uint32_t GetPluginVersion () override
 
- Public Member Functions inherited from lldb_private::SymbolFile
 SymbolFile (lldb::ObjectFileSP objfile_sp)
 
 ~SymbolFile () override
 
uint32_t GetAbilities ()
 Get a mask of what this symbol file supports for the object file that it was constructed with. More...
 
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...
 
uint32_t GetNumCompileUnits ()
 
lldb::CompUnitSP GetCompileUnitAtIndex (uint32_t idx)
 
SymtabGetSymtab ()
 
virtual XcodeSDK ParseXcodeSDK (CompileUnit &comp_unit)
 Return the Xcode SDK comp_unit was compiled against. More...
 
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 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 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 &regex, 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 &regex, 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 PreloadSymbols ()
 
virtual llvm::Expected< lldb_private::TypeSystem & > GetTypeSystemForLanguage (lldb::LanguageType language)
 
virtual CompilerDeclContext FindNamespace (ConstString name, const CompilerDeclContext &parent_decl_ctx)
 
ObjectFileGetObjectFile ()
 
const ObjectFileGetObjectFile () const
 
ObjectFileGetMainObjectFile ()
 
virtual std::vector< std::unique_ptr< CallEdge > > ParseCallEdgesInFunction (UserID func_id)
 
virtual void AddSymbols (Symtab &symtab)
 
virtual void SectionFileAddressesChanged ()
 Notify the SymbolFile that the file addresses in the Sections for this module have been changed. More...
 
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. More...
 
virtual void Dump (Stream &s)
 
- 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 lldb_private::ConstString GetPluginNameStatic ()
 
static const char * GetPluginDescriptionStatic ()
 
static lldb_private::SymbolFileCreateInstance (lldb::ObjectFileSP objfile_sp)
 
- Static Public Member Functions inherited from lldb_private::SymbolFile
static SymbolFileFindPlugin (lldb::ObjectFileSP objfile_sp)
 
static bool classof (const SymbolFile *obj)
 

Protected Types

typedef std::map< lldb_private::ConstString, lldb::TypeSP > TypeMap
 

Protected Member Functions

uint32_t CalculateNumCompileUnits () override
 
lldb::CompUnitSP ParseCompileUnitAtIndex (uint32_t index) override
 
- Protected Member Functions inherited from lldb_private::SymbolFile
void AssertModuleLock ()
 
virtual TypeListGetTypeList ()
 
void SetCompileUnitAtIndex (uint32_t idx, const lldb::CompUnitSP &cu_sp)
 

Protected Attributes

lldb_private::Symtab::IndexCollection m_source_indexes
 
lldb_private::Symtab::IndexCollection m_func_indexes
 
lldb_private::Symtab::IndexCollection m_code_indexes
 
lldb_private::Symtab::IndexCollection m_data_indexes
 
lldb_private::Symtab::NameToIndexMap m_objc_class_name_to_index
 
TypeMap m_objc_class_types
 
- Protected Attributes inherited from lldb_private::SymbolFile
lldb::ObjectFileSP m_objfile_sp
 
llvm::Optional< std::vector< lldb::CompUnitSP > > m_compile_units
 
TypeList m_type_list
 
Symtabm_symtab = nullptr
 
uint32_t m_abilities
 
bool m_calculated_abilities
 

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)
}
 

Detailed Description

Definition at line 18 of file SymbolFileSymtab.h.

Member Typedef Documentation

◆ TypeMap

typedef std::map<lldb_private::ConstString, lldb::TypeSP> SymbolFileSymtab::TypeMap
protected

Definition at line 97 of file SymbolFileSymtab.h.

Constructor & Destructor Documentation

◆ SymbolFileSymtab()

SymbolFileSymtab::SymbolFileSymtab ( lldb::ObjectFileSP  objfile_sp)

Definition at line 58 of file SymbolFileSymtab.cpp.

Member Function Documentation

◆ CalculateAbilities()

uint32_t SymbolFileSymtab::CalculateAbilities ( )
overridevirtual

◆ CalculateNumCompileUnits()

uint32_t SymbolFileSymtab::CalculateNumCompileUnits ( )
overrideprotectedvirtual

Implements lldb_private::SymbolFile.

Definition at line 107 of file SymbolFileSymtab.cpp.

References m_source_indexes.

◆ classof()

static bool SymbolFileSymtab::classof ( const SymbolFile obj)
inlinestatic

Definition at line 28 of file SymbolFileSymtab.h.

References ID.

◆ CompleteType()

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

Implements lldb_private::SymbolFile.

Definition at line 243 of file SymbolFileSymtab.cpp.

◆ CreateInstance()

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

Definition at line 50 of file SymbolFileSymtab.cpp.

◆ GetDynamicArrayInfoForUID()

llvm::Optional< SymbolFile::ArrayInfo > SymbolFileSymtab::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 238 of file SymbolFileSymtab.cpp.

◆ GetPluginDescriptionStatic()

const char * SymbolFileSymtab::GetPluginDescriptionStatic ( )
static

Definition at line 46 of file SymbolFileSymtab.cpp.

◆ GetPluginName()

lldb_private::ConstString SymbolFileSymtab::GetPluginName ( )
overridevirtual

Implements lldb_private::PluginInterface.

Definition at line 265 of file SymbolFileSymtab.cpp.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

lldb_private::ConstString SymbolFileSymtab::GetPluginNameStatic ( )
static

Definition at line 41 of file SymbolFileSymtab.cpp.

Referenced by GetPluginName().

◆ GetPluginVersion()

uint32_t SymbolFileSymtab::GetPluginVersion ( )
overridevirtual

Implements lldb_private::PluginInterface.

Definition at line 269 of file SymbolFileSymtab.cpp.

◆ GetTypes()

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

Implements lldb_private::SymbolFile.

Definition at line 54 of file SymbolFileSymtab.cpp.

◆ Initialize()

void SymbolFileSymtab::Initialize ( )
static

Definition at line 32 of file SymbolFileSymtab.cpp.

◆ isA()

bool SymbolFileSymtab::isA ( const void *  ClassID) const
inlineoverridevirtual

LLVM RTTI support.

Reimplemented from lldb_private::SymbolFile.

Definition at line 25 of file SymbolFileSymtab.h.

References ID.

◆ ParseBlocksRecursive()

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

Implements lldb_private::SymbolFile.

Definition at line 227 of file SymbolFileSymtab.cpp.

◆ ParseCompileUnitAtIndex()

CompUnitSP SymbolFileSymtab::ParseCompileUnitAtIndex ( uint32_t  index)
overrideprotectedvirtual

◆ ParseDebugMacros()

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

Implements lldb_private::SymbolFile.

Definition at line 213 of file SymbolFileSymtab.cpp.

◆ ParseFunctions()

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

◆ ParseImportedModules()

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

Implements lldb_private::SymbolFile.

Definition at line 222 of file SymbolFileSymtab.cpp.

◆ ParseLanguage()

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

Implements lldb_private::SymbolFile.

Definition at line 134 of file SymbolFileSymtab.cpp.

References lldb::eLanguageTypeUnknown.

◆ ParseLineTable()

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

Implements lldb_private::SymbolFile.

Definition at line 211 of file SymbolFileSymtab.cpp.

◆ ParseSupportFiles()

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

Definition at line 217 of file SymbolFileSymtab.cpp.

◆ ParseTypes()

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

Implements lldb_private::SymbolFile.

Definition at line 209 of file SymbolFileSymtab.cpp.

◆ ParseVariablesForContext()

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

Implements lldb_private::SymbolFile.

Definition at line 229 of file SymbolFileSymtab.cpp.

◆ ResolveSymbolContext()

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

◆ ResolveTypeUID()

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

Implements lldb_private::SymbolFile.

Definition at line 233 of file SymbolFileSymtab.cpp.

◆ Terminate()

void SymbolFileSymtab::Terminate ( )
static

Definition at line 37 of file SymbolFileSymtab.cpp.

Member Data Documentation

◆ ID

char SymbolFileSymtab::ID
staticprivate

LLVM RTTI support.

Definition at line 20 of file SymbolFileSymtab.h.

Referenced by classof(), and isA().

◆ m_code_indexes

lldb_private::Symtab::IndexCollection SymbolFileSymtab::m_code_indexes
protected

Definition at line 101 of file SymbolFileSymtab.h.

Referenced by CalculateAbilities(), and ParseFunctions().

◆ m_data_indexes

lldb_private::Symtab::IndexCollection SymbolFileSymtab::m_data_indexes
protected

Definition at line 102 of file SymbolFileSymtab.h.

Referenced by CalculateAbilities().

◆ m_func_indexes

lldb_private::Symtab::IndexCollection SymbolFileSymtab::m_func_indexes
protected

Definition at line 100 of file SymbolFileSymtab.h.

Referenced by CalculateAbilities(), and ParseFunctions().

◆ m_objc_class_name_to_index

lldb_private::Symtab::NameToIndexMap SymbolFileSymtab::m_objc_class_name_to_index
protected

Definition at line 103 of file SymbolFileSymtab.h.

Referenced by CalculateAbilities().

◆ m_objc_class_types

TypeMap SymbolFileSymtab::m_objc_class_types
protected

Definition at line 104 of file SymbolFileSymtab.h.

◆ m_source_indexes

lldb_private::Symtab::IndexCollection SymbolFileSymtab::m_source_indexes
protected

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