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

Public Member Functions

 DebugMapModule (const ModuleSP &exe_module_sp, uint32_t cu_idx, const FileSpec &file_spec, const ArchSpec &arch, const 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. More...
 
- Public Member Functions inherited from lldb_private::Module
 Module (const FileSpec &file_spec, const ArchSpec &arch, const ConstString *object_name=nullptr, lldb::offset_t object_offset=0, const llvm::sys::TimePoint<> &object_mod_time=llvm::sys::TimePoint<>())
 Construct with file specification and architecture. More...
 
 Module (const ModuleSpec &module_spec)
 
 ~Module () override
 Destructor. More...
 
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. More...
 
void CalculateSymbolContext (SymbolContext *sc) override
 Reconstruct the object's symbol context into sc. More...
 
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. More...
 
void Dump (Stream *s)
 Dump a description of this object to a Stream. More...
 
void DumpSymbolContext (Stream *s) override
 Dump the object's symbol context to the stream s. More...
 
const SymbolFindFirstSymbolWithNameAndType (ConstString name, lldb::SymbolType symbol_type=lldb::eSymbolTypeAny)
 Find a symbol in the object file's symbol table. More...
 
void FindSymbolsWithNameAndType (ConstString name, lldb::SymbolType symbol_type, SymbolContextList &sc_list)
 
void FindSymbolsMatchingRegExAndType (const RegularExpression &regex, lldb::SymbolType symbol_type, SymbolContextList &sc_list)
 
void FindFunctionSymbols (ConstString name, uint32_t name_type_mask, SymbolContextList &sc_list)
 Find a function symbols in the object file's symbol table. More...
 
void FindCompileUnits (const FileSpec &path, SymbolContextList &sc_list)
 Find compile units by partial or full path. More...
 
void FindFunctions (ConstString name, const CompilerDeclContext &parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool symbols_ok, bool inlines_ok, SymbolContextList &sc_list)
 Find functions by name. More...
 
void FindFunctions (const RegularExpression &regex, bool symbols_ok, bool inlines_ok, SymbolContextList &sc_list)
 Find functions by name. More...
 
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. More...
 
void FindGlobalVariables (ConstString name, const CompilerDeclContext &parent_decl_ctx, size_t max_matches, VariableList &variable_list)
 Find global and static variables by name. More...
 
void FindGlobalVariables (const RegularExpression &regex, size_t max_matches, VariableList &variable_list)
 Find global and static variables by regular expression. More...
 
void FindTypes (ConstString type_name, bool exact_match, size_t max_matches, llvm::DenseSet< lldb_private::SymbolFile *> &searched_symbol_files, TypeList &types)
 Find types by name. More...
 
void FindTypes (llvm::ArrayRef< CompilerContext > pattern, LanguageSet languages, llvm::DenseSet< lldb_private::SymbolFile *> &searched_symbol_files, TypeMap &types)
 Find types by name. More...
 
lldb::TypeSP FindFirstType (const SymbolContext &sc, ConstString type_name, bool exact_match)
 
void FindTypesInNamespace (ConstString type_name, const CompilerDeclContext &parent_decl_ctx, size_t max_matches, TypeList &type_list)
 Find types by name that are in a namespace. More...
 
const ArchSpecGetArchitecture () const
 Get const accessor for the module architecture. More...
 
const FileSpecGetFileSpec () const
 Get const accessor for the module file specification. More...
 
const FileSpecGetPlatformFileSpec () const
 Get accessor for the module platform file specification. More...
 
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 SetObjectModificationTime (const llvm::sys::TimePoint<> &mod_time)
 
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. More...
 
bool IsExecutable ()
 Tells whether this module is capable of being the main executable for a process. More...
 
bool IsLoadedInTarget (Target *target)
 Tells whether this module has been loaded in the target passed in. More...
 
bool LoadScriptingResourceInTarget (Target *target, Status &error, Stream *feedback_stream=nullptr)
 
size_t GetNumCompileUnits ()
 Get the number of compile units for this module. More...
 
lldb::CompUnitSP GetCompileUnitAtIndex (size_t idx)
 
ConstString GetObjectName () const
 
uint64_t GetObjectOffset () const
 
virtual ObjectFileGetObjectFile ()
 Get the object file representation for the current architecture. More...
 
virtual SectionListGetSectionList ()
 Get the unified section list for the module. More...
 
virtual void SectionFileAddressesChanged ()
 Notify the module that the file addresses for the Sections have been updated. More...
 
UnwindTableGetUnwindTable ()
 Returns a reference to the UnwindTable for this Module. More...
 
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. More...
 
SymtabGetSymtab ()
 
const lldb_private::UUIDGetUUID ()
 Get a reference to the UUID value contained in this object. More...
 
void ParseAllDebugSymbols ()
 A debugging function that will cause everything in a module to be parsed. More...
 
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. More...
 
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. More...
 
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. More...
 
void SetFileSpecAndObjectName (const FileSpec &file, ConstString object_name)
 
bool GetIsDynamicLinkEditor ()
 
llvm::Expected< TypeSystem & > GetTypeSystemForLanguage (lldb::LanguageType language)
 
void LogMessage (Log *log, const char *format,...) __attribute__((format(printf
 
void void LogMessageVerboseBacktrace (Log *log, const char *format,...) __attribute__((format(printf
 
void void void ReportWarning (const char *format,...) __attribute__((format(printf
 
void void void void ReportError (const char *format,...) __attribute__((format(printf
 
void void void void void ReportErrorIfModifyDetected (const char *format,...) __attribute__((format(printf
 
void void void void void 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). More...
 
bool RemapSourceFile (llvm::StringRef path, std::string &new_path) const
 Remaps a source file given path into new_path. More...
 
bool RemapSourceFile (const char *, std::string &) const =delete
 
bool MergeArchitecture (const ArchSpec &arch_spec)
 Update the ArchSpec to a more specific variant. More...
 
- Public Member Functions inherited from lldb_private::SymbolContextScope
virtual ~SymbolContextScope ()=default
 
virtual CompileUnitCalculateSymbolContextCompileUnit ()
 
virtual FunctionCalculateSymbolContextFunction ()
 
virtual BlockCalculateSymbolContextBlock ()
 
virtual SymbolCalculateSymbolContextSymbol ()
 

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. More...
 
llvm::sys::TimePoint m_mod_time
 The modification time for this module when it was created. More...
 
ArchSpec m_arch
 The architecture for this module. More...
 
UUID m_uuid
 Each module is assumed to have a unique identifier to help match it up to debug symbols. More...
 
FileSpec m_file
 The file representation on disk for this module (if there is one). More...
 
FileSpec m_platform_file
 The path to the module on the platform on which it is being debugged. More...
 
FileSpec m_remote_install_file
 If set when debugging on remote platforms, this module will be installed at this location. More...
 
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. More...
 
ConstString m_object_name
 The name an object within this module that is selected, or empty of the module is represented by m_file. More...
 
uint64_t m_object_offset
 
llvm::sys::TimePoint m_object_mod_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. More...
 
llvm::Optional< UnwindTablem_unwind_table
 Table of FuncUnwinders objects created for this Module's functions. More...
 
lldb::SymbolVendorUP m_symfile_up
 A pointer to the symbol vendor for this module. More...
 
std::vector< lldb::SymbolVendorUP > m_old_symfiles
 If anyone calls Module::SetSymbolFileFileSpec() and changes the symbol file,. More...
 
TypeSystemMap m_type_system_map
 A map of any type systems associated with this module. More...
 
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. More...
 
lldb::SectionListUP m_sections_up
 Unified section list for module that is used by the ObjectFile and and ObjectFile instances for the debug info. More...
 
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
 

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)
 
- Protected Member Functions inherited from lldb_private::Module
uint32_t ResolveSymbolContextForAddress (lldb::addr_t vm_addr, bool vm_addr_is_file_addr, lldb::SymbolContextItem resolve_scope, Address &so_addr, SymbolContext &sc)
 See if the module was modified after it was initially opened. More...
 
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 165 of file SymbolFileDWARFDebugMap.cpp.

Constructor & Destructor Documentation

◆ DebugMapModule()

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

Definition at line 167 of file SymbolFileDWARFDebugMap.cpp.

◆ ~DebugMapModule()

DebugMapModule::~DebugMapModule ( )
overridedefault

Member Function Documentation

◆ GetSymbolFile()

SymbolFile* 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 177 of file SymbolFileDWARFDebugMap.cpp.

References SymbolFileDWARFDebugMap::GetSymbolFileAsSymbolFileDWARF(), SymbolFileDWARF::SetDebugMapModule(), and lldb_private::UserID::SetID().

Member Data Documentation

◆ m_cu_idx

const uint32_t DebugMapModule::m_cu_idx
protected

Definition at line 219 of file SymbolFileDWARFDebugMap.cpp.

◆ m_exe_module_wp

ModuleWP DebugMapModule::m_exe_module_wp
protected

Definition at line 218 of file SymbolFileDWARFDebugMap.cpp.


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