summaryrefslogtreecommitdiffstats
path: root/lldb/include/lldb/Core/Module.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/include/lldb/Core/Module.h')
-rw-r--r--lldb/include/lldb/Core/Module.h85
1 files changed, 0 insertions, 85 deletions
diff --git a/lldb/include/lldb/Core/Module.h b/lldb/include/lldb/Core/Module.h
index 7359d7bcb4e..25b04a34715 100644
--- a/lldb/include/lldb/Core/Module.h
+++ b/lldb/include/lldb/Core/Module.h
@@ -91,7 +91,6 @@ class VariableList;
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class Module Module.h "lldb/Core/Module.h"
/// A class that describes an executable image and its associated
/// object and symbol files.
@@ -107,7 +106,6 @@ namespace lldb_private {
/// Module::GetSymbolVendor() is called.
///
/// The module will parse more detailed information as more queries are made.
-//----------------------------------------------------------------------
class Module : public std::enable_shared_from_this<Module>,
public SymbolContextScope {
public:
@@ -123,7 +121,6 @@ public:
static std::recursive_mutex &GetAllocationModuleCollectionMutex();
- //------------------------------------------------------------------
/// Construct with file specification and architecture.
///
/// Clients that wish to share modules with other targets should use
@@ -146,7 +143,6 @@ public:
/// The offset within an existing module used to extract a
/// module within a module (.a files and modules that contain
/// multiple architectures).
- //------------------------------------------------------------------
Module(
const FileSpec &file_spec, const ArchSpec &arch,
const ConstString *object_name = nullptr,
@@ -178,14 +174,11 @@ public:
return module_sp;
}
- //------------------------------------------------------------------
/// Destructor.
- //------------------------------------------------------------------
~Module() override;
bool MatchesModuleSpec(const ModuleSpec &module_ref);
- //------------------------------------------------------------------
/// Set the load address for all sections in a module to be the file address
/// plus \a slide.
///
@@ -222,15 +215,12 @@ public:
/// \return
/// /b True if any sections were successfully loaded in \a target,
/// /b false otherwise.
- //------------------------------------------------------------------
bool SetLoadAddress(Target &target, lldb::addr_t value, bool value_is_offset,
bool &changed);
- //------------------------------------------------------------------
/// \copydoc SymbolContextScope::CalculateSymbolContext(SymbolContext*)
///
/// \see SymbolContextScope
- //------------------------------------------------------------------
void CalculateSymbolContext(SymbolContext *sc) override;
lldb::ModuleSP CalculateSymbolContextModule() override;
@@ -239,7 +229,6 @@ public:
GetDescription(Stream *s,
lldb::DescriptionLevel level = lldb::eDescriptionLevelFull);
- //------------------------------------------------------------------
/// Get the module path and object name.
///
/// Modules can refer to object files. In this case the specification is
@@ -257,10 +246,8 @@ public:
///
/// \return
/// The object path + object name if there is one.
- //------------------------------------------------------------------
std::string GetSpecificationDescription() const;
- //------------------------------------------------------------------
/// Dump a description of this object to a Stream.
///
/// Dump a description of the contents of this object to the supplied stream
@@ -270,17 +257,13 @@ public:
///
/// \param[in] s
/// The stream to which to dump the object description.
- //------------------------------------------------------------------
void Dump(Stream *s);
- //------------------------------------------------------------------
/// \copydoc SymbolContextScope::DumpSymbolContext(Stream*)
///
/// \see SymbolContextScope
- //------------------------------------------------------------------
void DumpSymbolContext(Stream *s) override;
- //------------------------------------------------------------------
/// Find a symbol in the object file's symbol table.
///
/// \param[in] name
@@ -295,7 +278,6 @@ public:
/// \return
/// Returns a valid symbol pointer if a symbol was found,
/// nullptr otherwise.
- //------------------------------------------------------------------
const Symbol *FindFirstSymbolWithNameAndType(
ConstString name,
lldb::SymbolType symbol_type = lldb::eSymbolTypeAny);
@@ -308,7 +290,6 @@ public:
lldb::SymbolType symbol_type,
SymbolContextList &sc_list);
- //------------------------------------------------------------------
/// Find a function symbols in the object file's symbol table.
///
/// \param[in] name
@@ -324,11 +305,9 @@ public:
///
/// \return
/// The number of symbol contexts that were added to \a sc_list
- //------------------------------------------------------------------
size_t FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
SymbolContextList &sc_list);
- //------------------------------------------------------------------
/// Find compile units by partial or full path.
///
/// Finds all compile units that match \a path in all of the modules and
@@ -348,11 +327,9 @@ public:
///
/// \return
/// The number of matches added to \a sc_list.
- //------------------------------------------------------------------
size_t FindCompileUnits(const FileSpec &path, bool append,
SymbolContextList &sc_list);
- //------------------------------------------------------------------
/// Find functions by name.
///
/// If the function is an inlined function, it will have a block,
@@ -381,14 +358,12 @@ public:
///
/// \return
/// The number of matches added to \a sc_list.
- //------------------------------------------------------------------
size_t FindFunctions(ConstString name,
const CompilerDeclContext *parent_decl_ctx,
lldb::FunctionNameType name_type_mask, bool symbols_ok,
bool inlines_ok, bool append,
SymbolContextList &sc_list);
- //------------------------------------------------------------------
/// Find functions by name.
///
/// If the function is an inlined function, it will have a block,
@@ -408,12 +383,10 @@ public:
///
/// \return
/// The number of matches added to \a sc_list.
- //------------------------------------------------------------------
size_t FindFunctions(const RegularExpression &regex, bool symbols_ok,
bool inlines_ok, bool append,
SymbolContextList &sc_list);
- //------------------------------------------------------------------
/// Find addresses by file/line
///
/// \param[in] target_sp
@@ -441,7 +414,6 @@ public:
std::vector<Address> &output_local,
std::vector<Address> &output_extern);
- //------------------------------------------------------------------
/// Find global and static variables by name.
///
/// \param[in] name
@@ -460,12 +432,10 @@ public:
///
/// \return
/// The number of matches added to \a variable_list.
- //------------------------------------------------------------------
size_t FindGlobalVariables(ConstString name,
const CompilerDeclContext *parent_decl_ctx,
size_t max_matches, VariableList &variable_list);
- //------------------------------------------------------------------
/// Find global and static variables by regular expression.
///
/// \param[in] regex
@@ -480,11 +450,9 @@ public:
///
/// \return
/// The number of matches added to \a variable_list.
- //------------------------------------------------------------------
size_t FindGlobalVariables(const RegularExpression &regex, size_t max_matches,
VariableList &variable_list);
- //------------------------------------------------------------------
/// Find types by name.
///
/// Type lookups in modules go through the SymbolVendor (which will use one
@@ -518,7 +486,6 @@ public:
///
/// \return
/// The number of matches added to \a type_list.
- //------------------------------------------------------------------
size_t
FindTypes(ConstString type_name, bool exact_match, size_t max_matches,
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
@@ -527,7 +494,6 @@ public:
lldb::TypeSP FindFirstType(const SymbolContext &sc,
ConstString type_name, bool exact_match);
- //------------------------------------------------------------------
/// Find types by name that are in a namespace. This function is used by the
/// expression parser when searches need to happen in an exact namespace
/// scope.
@@ -544,20 +510,16 @@ public:
///
/// \return
/// The number of matches added to \a type_list.
- //------------------------------------------------------------------
size_t FindTypesInNamespace(ConstString type_name,
const CompilerDeclContext *parent_decl_ctx,
size_t max_matches, TypeList &type_list);
- //------------------------------------------------------------------
/// Get const accessor for the module architecture.
///
/// \return
/// A const reference to the architecture object.
- //------------------------------------------------------------------
const ArchSpec &GetArchitecture() const;
- //------------------------------------------------------------------
/// Get const accessor for the module file specification.
///
/// This function returns the file for the module on the host system that is
@@ -566,10 +528,8 @@ public:
///
/// \return
/// A const reference to the file specification object.
- //------------------------------------------------------------------
const FileSpec &GetFileSpec() const { return m_file; }
- //------------------------------------------------------------------
/// Get accessor for the module platform file specification.
///
/// Platform file refers to the path of the module as it is known on the
@@ -582,7 +542,6 @@ public:
///
/// \return
/// A const reference to the file specification object.
- //------------------------------------------------------------------
const FileSpec &GetPlatformFileSpec() const {
if (m_platform_file)
return m_platform_file;
@@ -617,16 +576,13 @@ public:
m_mod_time = mod_time;
}
- //------------------------------------------------------------------
/// Tells whether this module is capable of being the main executable for a
/// process.
///
/// \return
/// \b true if it is, \b false otherwise.
- //------------------------------------------------------------------
bool IsExecutable();
- //------------------------------------------------------------------
/// Tells whether this module has been loaded in the target passed in. This
/// call doesn't distinguish between whether the module is loaded by the
/// dynamic loader, or by a "target module add" type call.
@@ -636,19 +592,16 @@ public:
///
/// \return
/// \b true if it is, \b false otherwise.
- //------------------------------------------------------------------
bool IsLoadedInTarget(Target *target);
bool LoadScriptingResourceInTarget(Target *target, Status &error,
Stream *feedback_stream = nullptr);
- //------------------------------------------------------------------
/// Get the number of compile units for this module.
///
/// \return
/// The number of compile units that the symbol vendor plug-in
/// finds.
- //------------------------------------------------------------------
size_t GetNumCompileUnits();
lldb::CompUnitSP GetCompileUnitAtIndex(size_t idx);
@@ -657,7 +610,6 @@ public:
uint64_t GetObjectOffset() const { return m_object_offset; }
- //------------------------------------------------------------------
/// Get the object file representation for the current architecture.
///
/// If the object file has not been located or parsed yet, this function
@@ -670,10 +622,8 @@ public:
/// returned, else a valid object file interface will be
/// returned. The returned pointer is owned by this object and
/// remains valid as long as the object is around.
- //------------------------------------------------------------------
virtual ObjectFile *GetObjectFile();
- //------------------------------------------------------------------
/// Get the unified section list for the module. This is the section list
/// created by the module's object file and any debug info and symbol files
/// created by the symbol vendor.
@@ -683,10 +633,8 @@ public:
///
/// \return
/// Unified module section list.
- //------------------------------------------------------------------
virtual SectionList *GetSectionList();
- //------------------------------------------------------------------
/// Notify the module that the file addresses for the Sections have been
/// updated.
///
@@ -694,10 +642,8 @@ public:
/// should be called. Any parts of the module, object file, or symbol file
/// that has cached those file addresses must invalidate or update its
/// cache.
- //------------------------------------------------------------------
virtual void SectionFileAddressesChanged();
- //------------------------------------------------------------------
/// Returns a reference to the UnwindTable for this Module
///
/// The UnwindTable contains FuncUnwinders objects for any function in this
@@ -709,12 +655,10 @@ public:
/// \return
/// Returns the unwind table for this module. If this object has no
/// associated object file, an empty UnwindTable is returned.
- //------------------------------------------------------------------
UnwindTable &GetUnwindTable();
llvm::VersionTuple GetVersion();
- //------------------------------------------------------------------
/// Load an object file from memory.
///
/// If available, the size of the object file in memory may be passed to
@@ -726,11 +670,9 @@ public:
/// \return
/// The object file loaded from memory or nullptr, if the operation
/// failed (see the `error` for more information in that case).
- //------------------------------------------------------------------
ObjectFile *GetMemoryObjectFile(const lldb::ProcessSP &process_sp,
lldb::addr_t header_addr, Status &error,
size_t size_to_read = 512);
- //------------------------------------------------------------------
/// Get the symbol vendor interface for the current architecture.
///
/// If the symbol vendor file has not been located yet, this function will
@@ -742,21 +684,17 @@ public:
/// be returned, else a valid symbol vendor plug-in interface
/// will be returned. The returned pointer is owned by this
/// object and remains valid as long as the object is around.
- //------------------------------------------------------------------
virtual SymbolVendor *
GetSymbolVendor(bool can_create = true,
lldb_private::Stream *feedback_strm = nullptr);
- //------------------------------------------------------------------
/// Get accessor the type list for this module.
///
/// \return
/// A valid type list pointer, or nullptr if there is no valid
/// symbol vendor for this module.
- //------------------------------------------------------------------
TypeList *GetTypeList();
- //------------------------------------------------------------------
/// Get a reference to the UUID value contained in this object.
///
/// If the executable image file doesn't not have a UUID value built into
@@ -767,10 +705,8 @@ public:
/// A const pointer to the internal copy of the UUID value in
/// this module if this module has a valid UUID value, NULL
/// otherwise.
- //------------------------------------------------------------------
const lldb_private::UUID &GetUUID();
- //------------------------------------------------------------------
/// A debugging function that will cause everything in a module to
/// be parsed.
///
@@ -781,12 +717,10 @@ public:
/// complete list of the resulting debug information that gets parsed, or as
/// a debug function to ensure that the module can consume all of the debug
/// data the symbol vendor provides.
- //------------------------------------------------------------------
void ParseAllDebugSymbols();
bool ResolveFileAddress(lldb::addr_t vm_addr, Address &so_addr);
- //------------------------------------------------------------------
/// Resolve the symbol context for the given address.
///
/// Tries to resolve the matching symbol context based on a lookup from the
@@ -824,12 +758,10 @@ public:
/// The scope that has been resolved (see SymbolContext::Scope).
///
/// \see SymbolContext::Scope
- //------------------------------------------------------------------
uint32_t ResolveSymbolContextForAddress(
const Address &so_addr, lldb::SymbolContextItem resolve_scope,
SymbolContext &sc, bool resolve_tail_call_address = false);
- //------------------------------------------------------------------
/// Resolve items in the symbol context for a given file and line.
///
/// Tries to resolve \a file_path and \a line to a list of matching symbol
@@ -869,12 +801,10 @@ public:
/// The number of matches that were added to \a sc_list.
///
/// \see SymbolContext::Scope
- //------------------------------------------------------------------
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.
///
/// Tries to resolve \a file_spec and \a line to a list of matching symbol
@@ -915,7 +845,6 @@ public:
/// each item that was successfully resolved.
///
/// \see SymbolContext::Scope
- //------------------------------------------------------------------
uint32_t ResolveSymbolContextsForFileSpec(
const FileSpec &file_spec, uint32_t line, bool check_inlines,
lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list);
@@ -949,17 +878,13 @@ public:
void ReportErrorIfModifyDetected(const char *format, ...)
__attribute__((format(printf, 2, 3)));
- //------------------------------------------------------------------
// Return true if the file backing this module has changed since the module
// was originally created since we saved the initial file modification time
// when the module first gets created.
- //------------------------------------------------------------------
bool FileHasChanged() const;
- //------------------------------------------------------------------
// SymbolVendor, SymbolFile and ObjectFile member objects should lock the
// module mutex to avoid deadlocks.
- //------------------------------------------------------------------
std::recursive_mutex &GetMutex() const { return m_mutex; }
PathMappingList &GetSourceMappingList() { return m_source_mappings; }
@@ -968,7 +893,6 @@ public:
return m_source_mappings;
}
- //------------------------------------------------------------------
/// Finds a source file given a file spec using the module source path
/// remappings (if any).
///
@@ -987,10 +911,8 @@ public:
/// /b true if \a orig_spec was successfully located and
/// \a new_spec is filled in with an existing file spec,
/// \b false otherwise.
- //------------------------------------------------------------------
bool FindSourceFile(const FileSpec &orig_spec, FileSpec &new_spec) const;
- //------------------------------------------------------------------
/// Remaps a source file given \a path into \a new_path.
///
/// Remaps \a path if any source remappings match. This function does NOT
@@ -1006,11 +928,9 @@ public:
/// \return
/// /b true if \a path was successfully located and \a new_path
/// is filled in with a new source path, \b false otherwise.
- //------------------------------------------------------------------
bool RemapSourceFile(llvm::StringRef path, std::string &new_path) const;
bool RemapSourceFile(const char *, std::string &) const = delete;
- //----------------------------------------------------------------------
/// \class LookupInfo Module.h "lldb/Core/Module.h"
/// A class that encapsulates name lookup information.
///
@@ -1032,7 +952,6 @@ public:
/// Function lookups are done in Module.cpp, ModuleList.cpp and in
/// BreakpointResolverName.cpp and they all now use this class to do lookups
/// correctly.
- //----------------------------------------------------------------------
class LookupInfo {
public:
LookupInfo()
@@ -1079,9 +998,7 @@ public:
};
protected:
- //------------------------------------------------------------------
// Member Variables
- //------------------------------------------------------------------
mutable std::recursive_mutex m_mutex; ///< A mutex to keep this object happy
///in multi-threaded environments.
@@ -1136,7 +1053,6 @@ protected:
m_first_file_changed_log : 1; /// See if the module was modified after it
/// was initially opened.
- //------------------------------------------------------------------
/// Resolve a file or load virtual address.
///
/// Tries to resolve \a vm_addr as a file address (if \a
@@ -1169,7 +1085,6 @@ protected:
/// each item that was successfully resolved.
///
/// \see SymbolContext::Scope
- //------------------------------------------------------------------
uint32_t ResolveSymbolContextForAddress(lldb::addr_t vm_addr,
bool vm_addr_is_file_addr,
lldb::SymbolContextItem resolve_scope,
OpenPOWER on IntegriCloud