LLDB mainline
Public Member Functions | Protected Attributes | List of all members
lldb_private::plugin::dwarf::DebugMapModule Class Reference
Inheritance diagram for lldb_private::plugin::dwarf::DebugMapModule:
Inheritance graph
[legend]

Public Member Functions

 DebugMapModule (const ModuleSP &exe_module_sp, uint32_t cu_idx, const FileSpec &file_spec, const ArchSpec &arch, ConstString object_name, off_t object_offset, const llvm::sys::TimePoint<> object_mod_time)
 
 ~DebugMapModule () override=default
 
SymbolFileGetSymbolFile (bool can_create=true, lldb_private::Stream *feedback_strm=nullptr) override
 Get the module's symbol file.
 
- Public Member Functions inherited from lldb_private::Module
 Module (const FileSpec &file_spec, const ArchSpec &arch, ConstString object_name=ConstString(), lldb::offset_t object_offset=0, const llvm::sys::TimePoint<> &object_mod_time=llvm::sys::TimePoint<>())
 Construct with file specification and architecture.
 
 Module (const ModuleSpec &module_spec)
 
 ~Module () override
 Destructor.
 
bool MatchesModuleSpec (const ModuleSpec &module_ref)
 
bool SetLoadAddress (Target &target, lldb::addr_t value, bool value_is_offset, bool &changed)
 Set the load address for all sections in a module to be the file address plus slide.
 
void CalculateSymbolContext (SymbolContext *sc) override
 Reconstruct the object's symbol context into sc.
 
lldb::ModuleSP CalculateSymbolContextModule () override
 
void GetDescription (llvm::raw_ostream &s, lldb::DescriptionLevel level=lldb::eDescriptionLevelFull)
 
std::string GetSpecificationDescription () const
 Get the module path and object name.
 
void Dump (Stream *s)
 Dump a description of this object to a Stream.
 
void DumpSymbolContext (Stream *s) override
 Dump the object's symbol context to the stream s.
 
const SymbolFindFirstSymbolWithNameAndType (ConstString name, lldb::SymbolType symbol_type=lldb::eSymbolTypeAny)
 Find a symbol in the object file's symbol table.
 
void FindSymbolsWithNameAndType (ConstString name, lldb::SymbolType symbol_type, SymbolContextList &sc_list)
 
void FindSymbolsMatchingRegExAndType (const RegularExpression &regex, lldb::SymbolType symbol_type, SymbolContextList &sc_list, Mangled::NamePreference mangling_preference=Mangled::ePreferDemangled)
 
void FindFunctionSymbols (ConstString name, uint32_t name_type_mask, SymbolContextList &sc_list)
 Find a function symbols in the object file's symbol table.
 
void FindCompileUnits (const FileSpec &path, SymbolContextList &sc_list)
 Find compile units by partial or full path.
 
void FindFunctions (const LookupInfo &lookup_info, const CompilerDeclContext &parent_decl_ctx, const ModuleFunctionSearchOptions &options, SymbolContextList &sc_list)
 Find functions by lookup info.
 
void FindFunctions (ConstString name, const CompilerDeclContext &parent_decl_ctx, lldb::FunctionNameType name_type_mask, const ModuleFunctionSearchOptions &options, SymbolContextList &sc_list)
 Find functions by name.
 
void FindFunctions (llvm::ArrayRef< CompilerContext > compiler_ctx, lldb::FunctionNameType name_type_mask, const ModuleFunctionSearchOptions &options, SymbolContextList &sc_list)
 Find functions by compiler context.
 
void FindFunctions (const RegularExpression &regex, const ModuleFunctionSearchOptions &options, SymbolContextList &sc_list)
 Find functions by name.
 
void FindAddressesForLine (const lldb::TargetSP target_sp, const FileSpec &file, uint32_t line, Function *function, std::vector< Address > &output_local, std::vector< Address > &output_extern)
 Find addresses by file/line.
 
void FindGlobalVariables (ConstString name, const CompilerDeclContext &parent_decl_ctx, size_t max_matches, VariableList &variable_list)
 Find global and static variables by name.
 
void FindGlobalVariables (const RegularExpression &regex, size_t max_matches, VariableList &variable_list)
 Find global and static variables by regular expression.
 
void FindTypes (const TypeQuery &query, TypeResults &results)
 Find types using a type-matching object that contains all search parameters.
 
const ArchSpecGetArchitecture () const
 Get const accessor for the module architecture.
 
const FileSpecGetFileSpec () const
 Get const accessor for the module file specification.
 
const FileSpecGetPlatformFileSpec () const
 Get accessor for the module platform file specification.
 
void SetPlatformFileSpec (const FileSpec &file)
 
const FileSpecGetRemoteInstallFileSpec () const
 
void SetRemoteInstallFileSpec (const FileSpec &file)
 
const FileSpecGetSymbolFileFileSpec () const
 
void PreloadSymbols ()
 
void SetSymbolFileFileSpec (const FileSpec &file)
 
const llvm::sys::TimePoint & GetModificationTime () const
 
const llvm::sys::TimePoint & GetObjectModificationTime () const
 
void RegisterXcodeSDK (llvm::StringRef sdk, llvm::StringRef sysroot)
 This callback will be called by SymbolFile implementations when parsing a compile unit that contains SDK information.
 
bool IsExecutable ()
 Tells whether this module is capable of being the main executable for a process.
 
bool IsLoadedInTarget (Target *target)
 Tells whether this module has been loaded in the target passed in.
 
bool LoadScriptingResourceInTarget (Target *target, Status &error, Stream &feedback_stream)
 
size_t GetNumCompileUnits ()
 Get the number of compile units for this module.
 
lldb::CompUnitSP GetCompileUnitAtIndex (size_t idx)
 
ConstString GetObjectName () const
 
uint64_t GetObjectOffset () const
 
virtual ObjectFileGetObjectFile ()
 Get the object file representation for the current architecture.
 
virtual SectionListGetSectionList ()
 Get the unified section list for the module.
 
virtual void SectionFileAddressesChanged ()
 Notify the module that the file addresses for the Sections have been updated.
 
UnwindTableGetUnwindTable ()
 Returns a reference to the UnwindTable for this Module.
 
llvm::VersionTuple GetVersion ()
 
ObjectFileGetMemoryObjectFile (const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, Status &error, size_t size_to_read=512)
 Load an object file from memory.
 
virtual SymbolFileGetSymbolFile (bool can_create=true, Stream *feedback_strm=nullptr)
 Get the module's symbol file.
 
SymtabGetSymtab ()
 
const lldb_private::UUIDGetUUID ()
 Get a reference to the UUID value contained in this object.
 
void ParseAllDebugSymbols ()
 A debugging function that will cause everything in a module to be parsed.
 
bool ResolveFileAddress (lldb::addr_t vm_addr, Address &so_addr)
 
uint32_t ResolveSymbolContextForAddress (const Address &so_addr, lldb::SymbolContextItem resolve_scope, SymbolContext &sc, bool resolve_tail_call_address=false)
 Resolve the symbol context for the given address.
 
uint32_t ResolveSymbolContextForFilePath (const char *file_path, uint32_t line, bool check_inlines, lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list)
 Resolve items in the symbol context for a given file and line.
 
uint32_t ResolveSymbolContextsForFileSpec (const FileSpec &file_spec, uint32_t line, bool check_inlines, lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list)
 Resolve items in the symbol context for a given file and line.
 
void SetFileSpecAndObjectName (const FileSpec &file, ConstString object_name)
 
bool GetIsDynamicLinkEditor ()
 
llvm::Expected< lldb::TypeSystemSPGetTypeSystemForLanguage (lldb::LanguageType language)
 
void ForEachTypeSystem (llvm::function_ref< bool(lldb::TypeSystemSP)> callback)
 Call callback for each TypeSystem in this Module.
 
template<typename... Args>
void LogMessage (Log *log, const char *format, Args &&...args)
 
template<typename... Args>
void LogMessageVerboseBacktrace (Log *log, const char *format, Args &&...args)
 
template<typename... Args>
void ReportWarning (const char *format, Args &&...args)
 
template<typename... Args>
void ReportError (const char *format, Args &&...args)
 
template<typename... Args>
void ReportErrorIfModifyDetected (const char *format, Args &&...args)
 
void ReportWarningOptimization (std::optional< lldb::user_id_t > debugger_id)
 
void ReportWarningUnsupportedLanguage (lldb::LanguageType language, std::optional< lldb::user_id_t > debugger_id)
 
bool FileHasChanged () const
 
std::recursive_mutex & GetMutex () const
 
PathMappingListGetSourceMappingList ()
 
const PathMappingListGetSourceMappingList () const
 
bool FindSourceFile (const FileSpec &orig_spec, FileSpec &new_spec) const
 Finds a source file given a file spec using the module source path remappings (if any).
 
std::optional< std::string > RemapSourceFile (llvm::StringRef path) const
 Remaps a source file given path into new_path.
 
bool RemapSourceFile (const char *, std::string &) const =delete
 
bool MergeArchitecture (const ArchSpec &arch_spec)
 Update the ArchSpec to a more specific variant.
 
StatsDurationGetSymtabParseTime ()
 Accessor for the symbol table parse time metric.
 
StatsDurationGetSymtabIndexTime ()
 Accessor for the symbol table index time metric.
 
uint32_t Hash ()
 Get a unique hash for this module.
 
std::string GetCacheKey ()
 Get a unique cache key for the current module.
 
- Public Member Functions inherited from lldb_private::SymbolContextScope
virtual ~SymbolContextScope ()=default
 
virtual void CalculateSymbolContext (SymbolContext *sc)=0
 Reconstruct the object's symbol context into sc.
 
virtual lldb::ModuleSP CalculateSymbolContextModule ()
 
virtual CompileUnitCalculateSymbolContextCompileUnit ()
 
virtual FunctionCalculateSymbolContextFunction ()
 
virtual BlockCalculateSymbolContextBlock ()
 
virtual SymbolCalculateSymbolContextSymbol ()
 
virtual void DumpSymbolContext (Stream *s)=0
 Dump the object's symbol context to the stream s.
 

Protected Attributes

ModuleWP m_exe_module_wp
 
const uint32_t m_cu_idx
 
- Protected Attributes inherited from lldb_private::Module
std::recursive_mutex m_mutex
 A mutex to keep this object happy in multi-threaded environments.
 
llvm::sys::TimePoint m_mod_time
 The modification time for this module when it was created.
 
ArchSpec m_arch
 The architecture for this module.
 
UUID m_uuid
 Each module is assumed to have a unique identifier to help match it up to debug symbols.
 
FileSpec m_file
 The file representation on disk for this module (if there is one).
 
FileSpec m_platform_file
 The path to the module on the platform on which it is being debugged.
 
FileSpec m_remote_install_file
 If set when debugging on remote platforms, this module will be installed at this location.
 
FileSpec m_symfile_spec
 If this path is valid, then this is the file that will be used as the symbol file for this module.
 
ConstString m_object_name
 The name an object within this module that is selected, or empty of the module is represented by m_file.
 
uint64_t m_object_offset = 0
 
llvm::sys::TimePoint m_object_mod_time
 
lldb::DataBufferSP m_data_sp
 DataBuffer containing the module image, if it was provided at construction time.
 
lldb::ObjectFileSP m_objfile_sp
 A shared pointer to the object file parser for this module as it may or may not be shared with the SymbolFile.
 
std::optional< UnwindTablem_unwind_table
 Table of FuncUnwinders objects created for this Module's functions.
 
lldb::SymbolVendorUP m_symfile_up
 A pointer to the symbol vendor for this module.
 
std::vector< lldb::SymbolVendorUPm_old_symfiles
 If anyone calls Module::SetSymbolFileFileSpec() and changes the symbol file,.
 
TypeSystemMap m_type_system_map
 A map of any type systems associated with this module.
 
PathMappingList m_source_mappings
 Module specific source remappings for when you have debug info for a module that doesn't match where the sources currently are.
 
lldb::SectionListUP m_sections_up
 Unified section list for module that is used by the ObjectFile and ObjectFile instances for the debug info.
 
std::atomic< bool > m_did_load_objfile {false}
 
std::atomic< bool > m_did_load_symfile {false}
 
std::atomic< bool > m_did_set_uuid {false}
 
bool m_file_has_changed: 1
 
bool m_first_file_changed_log: 1
 
StatsDuration m_symtab_parse_time
 See if the module was modified after it was initially opened.
 
StatsDuration m_symtab_index_time
 We store a symbol named index time duration here because we might have an object file and a symbol file which both have symbol tables.
 
std::once_flag m_optimization_warning
 
std::once_flag m_language_warning
 

Additional Inherited Members

- Static Public Member Functions inherited from lldb_private::Module
static size_t GetNumberAllocatedModules ()
 
static ModuleGetAllocatedModuleAtIndex (size_t idx)
 
static std::recursive_mutex & GetAllocationModuleCollectionMutex ()
 
template<typename ObjFilePlugin , typename... Args>
static lldb::ModuleSP CreateModuleFromObjectFile (Args &&...args)
 
static DataFileCacheGetIndexCache ()
 Get the global index file cache.
 
- Protected Member Functions inherited from lldb_private::Module
void SymbolIndicesToSymbolContextList (Symtab *symtab, std::vector< uint32_t > &symbol_indexes, SymbolContextList &sc_list)
 
bool SetArchitecture (const ArchSpec &new_arch)
 
void SetUUID (const lldb_private::UUID &uuid)
 
SectionListGetUnifiedSectionList ()
 

Detailed Description

Definition at line 174 of file SymbolFileDWARFDebugMap.cpp.

Constructor & Destructor Documentation

◆ DebugMapModule()

lldb_private::plugin::dwarf::DebugMapModule::DebugMapModule ( const ModuleSP exe_module_sp,
uint32_t  cu_idx,
const FileSpec file_spec,
const ArchSpec arch,
ConstString  object_name,
off_t  object_offset,
const llvm::sys::TimePoint<>  object_mod_time 
)
inline

Definition at line 176 of file SymbolFileDWARFDebugMap.cpp.

◆ ~DebugMapModule()

lldb_private::plugin::dwarf::DebugMapModule::~DebugMapModule ( )
overridedefault

Member Function Documentation

◆ GetSymbolFile()

SymbolFile * lldb_private::plugin::dwarf::DebugMapModule::GetSymbolFile ( bool  can_create = true,
lldb_private::Stream feedback_strm = nullptr 
)
inlineoverridevirtual

Get the module's symbol file.

If the symbol file has already been loaded, this function returns it. All arguments are ignored. If the symbol file has not been located yet, and the can_create argument is false, the function returns nullptr. If can_create is true, this function will find the best SymbolFile plug-in that can use the current object file. feedback_strm, if not null, is used to report the details of the search process.

Reimplemented from lldb_private::Module.

Definition at line 186 of file SymbolFileDWARFDebugMap.cpp.

References lldb_private::Module::GetSymbolFile(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::GetSymbolFileAsSymbolFileDWARF(), lldb_private::plugin::dwarf::SymbolFileDWARF::SetDebugMapModule(), and lldb_private::plugin::dwarf::SymbolFileDWARF::SetFileIndex().

Member Data Documentation

◆ m_cu_idx

const uint32_t lldb_private::plugin::dwarf::DebugMapModule::m_cu_idx
protected

Definition at line 228 of file SymbolFileDWARFDebugMap.cpp.

◆ m_exe_module_wp

ModuleWP lldb_private::plugin::dwarf::DebugMapModule::m_exe_module_wp
protected

Definition at line 227 of file SymbolFileDWARFDebugMap.cpp.


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