diff options
Diffstat (limited to 'include/lldb/Core/Module.h')
| -rw-r--r-- | include/lldb/Core/Module.h | 398 |
1 files changed, 184 insertions, 214 deletions
diff --git a/include/lldb/Core/Module.h b/include/lldb/Core/Module.h index da981ade78ba..83d5f519f086 100644 --- a/include/lldb/Core/Module.h +++ b/include/lldb/Core/Module.h @@ -12,6 +12,7 @@ #include "lldb/Core/Address.h" // for Address #include "lldb/Core/ModuleSpec.h" // for ModuleSpec +#include "lldb/Symbol/ObjectFile.h" // for ObjectFile #include "lldb/Symbol/SymbolContextScope.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Target/PathMappingList.h" @@ -93,33 +94,30 @@ namespace lldb_private { //---------------------------------------------------------------------- /// @class Module Module.h "lldb/Core/Module.h" -/// @brief A class that describes an executable image and its associated +/// A class that describes an executable image and its associated /// object and symbol files. /// /// The module is designed to be able to select a single slice of an -/// executable image as it would appear on disk and during program -/// execution. +/// executable image as it would appear on disk and during program execution. /// /// Modules control when and if information is parsed according to which /// accessors are called. For example the object file (ObjectFile) -/// representation will only be parsed if the object file is requested -/// using the Module::GetObjectFile() is called. The debug symbols -/// will only be parsed if the symbol vendor (SymbolVendor) is -/// requested using the Module::GetSymbolVendor() is called. +/// representation will only be parsed if the object file is requested using +/// the Module::GetObjectFile() is called. The debug symbols will only be +/// parsed if the symbol vendor (SymbolVendor) is requested using the +/// Module::GetSymbolVendor() is called. /// -/// The module will parse more detailed information as more queries are -/// made. +/// The module will parse more detailed information as more queries are made. //---------------------------------------------------------------------- class Module : public std::enable_shared_from_this<Module>, public SymbolContextScope { public: - // Static functions that can track the lifetime of module objects. - // This is handy because we might have Module objects that are in - // shared pointers that aren't in the global module list (from - // ModuleList). If this is the case we need to know about it. - // The modules in the global list maintained by these functions - // can be viewed using the "target modules list" command using the - // "--global" (-g for short). + // Static functions that can track the lifetime of module objects. This is + // handy because we might have Module objects that are in shared pointers + // that aren't in the global module list (from ModuleList). If this is the + // case we need to know about it. The modules in the global list maintained + // by these functions can be viewed using the "target modules list" command + // using the "--global" (-g for short). static size_t GetNumberAllocatedModules(); static Module *GetAllocatedModuleAtIndex(size_t idx); @@ -129,8 +127,8 @@ public: //------------------------------------------------------------------ /// Construct with file specification and architecture. /// - /// Clients that wish to share modules with other targets should - /// use ModuleList::GetSharedModule(). + /// Clients that wish to share modules with other targets should use + /// ModuleList::GetSharedModule(). /// /// @param[in] file_spec /// The file specification for the on disk representation of @@ -158,8 +156,23 @@ public: Module(const ModuleSpec &module_spec); - static lldb::ModuleSP - CreateJITModule(const lldb::ObjectFileJITDelegateSP &delegate_sp); + template <typename ObjFilePlugin, typename... Args> + static lldb::ModuleSP CreateModuleFromObjectFile(Args &&... args) { + // Must create a module and place it into a shared pointer before we can + // create an object file since it has a std::weak_ptr back to the module, + // so we need to control the creation carefully in this static function + lldb::ModuleSP module_sp(new Module()); + module_sp->m_objfile_sp = + std::make_shared<ObjFilePlugin>(module_sp, std::forward<Args>(args)...); + + // Once we get the object file, update our module with the object file's + // architecture since it might differ in vendor/os if some parts were + // unknown. + if (!module_sp->m_objfile_sp->GetArchitecture(module_sp->m_arch)) + return nullptr; + + return module_sp; + } //------------------------------------------------------------------ /// Destructor. @@ -169,13 +182,13 @@ public: bool MatchesModuleSpec(const ModuleSpec &module_ref); //------------------------------------------------------------------ - /// Set the load address for all sections in a module to be the - /// file address plus \a slide. + /// Set the load address for all sections in a module to be the file address + /// plus \a slide. /// - /// Many times a module will be loaded in a target with a constant - /// offset applied to all top level sections. This function can - /// set the load address for all top level sections to be the - /// section file address + offset. + /// Many times a module will be loaded in a target with a constant offset + /// applied to all top level sections. This function can set the load + /// address for all top level sections to be the section file address + + /// offset. /// /// @param[in] target /// The target in which to apply the section load addresses. @@ -225,19 +238,18 @@ public: //------------------------------------------------------------------ /// Get the module path and object name. /// - /// Modules can refer to object files. In this case the specification - /// is simple and would return the path to the file: + /// Modules can refer to object files. In this case the specification is + /// simple and would return the path to the file: /// /// "/usr/lib/foo.dylib" /// - /// Modules can be .o files inside of a BSD archive (.a file). In - /// this case, the object specification will look like: + /// Modules can be .o files inside of a BSD archive (.a file). In this case, + /// the object specification will look like: /// /// "/usr/lib/foo.a(bar.o)" /// - /// There are many places where logging wants to log this fully - /// qualified specification, so we centralize this functionality - /// here. + /// There are many places where logging wants to log this fully qualified + /// specification, so we centralize this functionality here. /// /// @return /// The object path + object name if there is one. @@ -247,11 +259,10 @@ public: //------------------------------------------------------------------ /// Dump a description of this object to a Stream. /// - /// Dump a description of the contents of this object to the - /// supplied stream \a s. The dumped content will be only what has - /// been loaded or parsed up to this point at which this function - /// is called, so this is a good way to see what has been parsed - /// in a module. + /// Dump a description of the contents of this object to the supplied stream + /// \a s. The dumped content will be only what has been loaded or parsed up + /// to this point at which this function is called, so this is a good way to + /// see what has been parsed in a module. /// /// @param[in] s /// The stream to which to dump the object description. @@ -316,8 +327,8 @@ public: //------------------------------------------------------------------ /// Find compile units by partial or full path. /// - /// Finds all compile units that match \a path in all of the modules - /// and returns the results in \a sc_list. + /// Finds all compile units that match \a path in all of the modules and + /// returns the results in \a sc_list. /// /// @param[in] path /// The name of the function we are looking for. @@ -342,8 +353,7 @@ public: /// /// If the function is an inlined function, it will have a block, /// representing the inlined function, and the function will be the - /// containing function. If it is not inlined, then the block will - /// be NULL. + /// containing function. If it is not inlined, then the block will be NULL. /// /// @param[in] name /// The name of the compile unit we are looking for. @@ -379,8 +389,7 @@ public: /// /// If the function is an inlined function, it will have a block, /// representing the inlined function, and the function will be the - /// containing function. If it is not inlined, then the block will - /// be NULL. + /// containing function. If it is not inlined, then the block will be NULL. /// /// @param[in] regex /// A regular expression to use when matching the name. @@ -438,26 +447,19 @@ public: /// @param[in] parent_decl_ctx /// If valid, a decl context that results must exist within /// - /// @param[in] append - /// If \b true, any matches will be appended to \a - /// variable_list, else matches replace the contents of - /// \a variable_list. - /// /// @param[in] max_matches /// Allow the number of matches to be limited to \a /// max_matches. Specify UINT32_MAX to get all possible matches. /// /// @param[in] variable_list - /// A list of variables that gets the matches appended to (if - /// \a append it \b true), or replace (if \a append is \b false). + /// A list of variables that gets the matches appended to. /// /// @return /// The number of matches added to \a variable_list. //------------------------------------------------------------------ size_t FindGlobalVariables(const ConstString &name, const CompilerDeclContext *parent_decl_ctx, - bool append, size_t max_matches, - VariableList &variable_list); + size_t max_matches, VariableList &variable_list); //------------------------------------------------------------------ /// Find global and static variables by regular expression. @@ -465,44 +467,36 @@ public: /// @param[in] regex /// A regular expression to use when matching the name. /// - /// @param[in] append - /// If \b true, any matches will be appended to \a - /// variable_list, else matches replace the contents of - /// \a variable_list. - /// /// @param[in] max_matches /// Allow the number of matches to be limited to \a /// max_matches. Specify UINT32_MAX to get all possible matches. /// /// @param[in] variable_list - /// A list of variables that gets the matches appended to (if - /// \a append it \b true), or replace (if \a append is \b false). + /// A list of variables that gets the matches appended to. /// /// @return /// The number of matches added to \a variable_list. //------------------------------------------------------------------ - size_t FindGlobalVariables(const RegularExpression ®ex, bool append, - size_t max_matches, VariableList &variable_list); + size_t FindGlobalVariables(const RegularExpression ®ex, size_t max_matches, + VariableList &variable_list); //------------------------------------------------------------------ /// Find types by name. /// - /// Type lookups in modules go through the SymbolVendor (which will - /// use one or more SymbolFile subclasses). The SymbolFile needs to - /// be able to lookup types by basename and not the fully qualified - /// typename. This allows the type accelerator tables to stay small, - /// even with heavily templatized C++. The type search will then - /// narrow down the search results. If "exact_match" is true, then - /// the type search will only match exact type name matches. If - /// "exact_match" is false, the type will match as long as the base - /// typename matches and as long as any immediate containing - /// namespaces/class scopes that are specified match. So to search - /// for a type "d" in "b::c", the name "b::c::d" can be specified - /// and it will match any class/namespace "b" which contains a - /// class/namespace "c" which contains type "d". We do this to - /// allow users to not always have to specify complete scoping on - /// all expressions, but it also allows for exact matching when - /// required. + /// Type lookups in modules go through the SymbolVendor (which will use one + /// or more SymbolFile subclasses). The SymbolFile needs to be able to + /// lookup types by basename and not the fully qualified typename. This + /// allows the type accelerator tables to stay small, even with heavily + /// templatized C++. The type search will then narrow down the search + /// results. If "exact_match" is true, then the type search will only match + /// exact type name matches. If "exact_match" is false, the type will match + /// as long as the base typename matches and as long as any immediate + /// containing namespaces/class scopes that are specified match. So to + /// search for a type "d" in "b::c", the name "b::c::d" can be specified and + /// it will match any class/namespace "b" which contains a class/namespace + /// "c" which contains type "d". We do this to allow users to not always + /// have to specify complete scoping on all expressions, but it also allows + /// for exact matching when required. /// /// @param[in] sc /// A symbol context that scopes where to extract a type list @@ -535,9 +529,9 @@ public: const 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. + /// 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. /// /// @param[in] sc /// A symbol context that scopes where to extract a type list @@ -572,9 +566,9 @@ public: //------------------------------------------------------------------ /// Get const accessor for the module file specification. /// - /// This function returns the file for the module on the host system - /// that is running LLDB. This can differ from the path on the - /// platform since we might be doing remote debugging. + /// This function returns the file for the module on the host system that is + /// running LLDB. This can differ from the path on the platform since we + /// might be doing remote debugging. /// /// @return /// A const reference to the file specification object. @@ -584,14 +578,13 @@ public: //------------------------------------------------------------------ /// Get accessor for the module platform file specification. /// - /// Platform file refers to the path of the module as it is known on - /// the remote system on which it is being debugged. For local - /// debugging this is always the same as Module::GetFileSpec(). But - /// remote debugging might mention a file "/usr/lib/liba.dylib" - /// which might be locally downloaded and cached. In this case the - /// platform file could be something like: - /// "/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib" - /// The file could also be cached in a local developer kit directory. + /// Platform file refers to the path of the module as it is known on the + /// remote system on which it is being debugged. For local debugging this is + /// always the same as Module::GetFileSpec(). But remote debugging might + /// mention a file "/usr/lib/liba.dylib" which might be locally downloaded + /// and cached. In this case the platform file could be something like: + /// "/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib" The + /// file could also be cached in a local developer kit directory. /// /// @return /// A const reference to the file specification object. @@ -631,8 +624,8 @@ public: } //------------------------------------------------------------------ - /// Tells whether this module is capable of being the main executable - /// for a process. + /// Tells whether this module is capable of being the main executable for a + /// process. /// /// @return /// \b true if it is, \b false otherwise. @@ -640,9 +633,9 @@ public: 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. + /// 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. /// /// @param[in] target /// The target to check whether this is loaded in. @@ -673,9 +666,8 @@ public: //------------------------------------------------------------------ /// Get the object file representation for the current architecture. /// - /// If the object file has not been located or parsed yet, this - /// function will find the best ObjectFile plug-in that can parse - /// Module::m_file. + /// If the object file has not been located or parsed yet, this function + /// will find the best ObjectFile plug-in that can parse Module::m_file. /// /// @return /// If Module::m_file does not exist, or no plug-in was found @@ -688,12 +680,12 @@ public: 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. + /// 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. /// - /// If the symbol vendor has not been loaded yet, this function - /// will return the section list for the object file. + /// If the symbol vendor has not been loaded yet, this function will return + /// the section list for the object file. /// /// @return /// Unified module section list. @@ -701,27 +693,26 @@ public: virtual SectionList *GetSectionList(); //------------------------------------------------------------------ - /// Notify the module that the file addresses for the Sections have - /// been updated. + /// Notify the module that the file addresses for the Sections have been + /// updated. /// - /// If the Section file addresses for a module are updated, this - /// method 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. + /// If the Section file addresses for a module are updated, this method + /// 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(); - uint32_t GetVersion(uint32_t *versions, uint32_t num_versions); + llvm::VersionTuple GetVersion(); //------------------------------------------------------------------ /// Load an object file from memory. /// - /// If available, the size of the object file in memory may be - /// passed to avoid additional round trips to process memory. - /// If the size is not provided, a default value is used. This - /// value should be large enough to enable the ObjectFile plugins - /// to read the header of the object file without going back to the - /// process. + /// If available, the size of the object file in memory may be passed to + /// avoid additional round trips to process memory. If the size is not + /// provided, a default value is used. This value should be large enough to + /// enable the ObjectFile plugins to read the header of the object file + /// without going back to the process. /// /// @return /// The object file loaded from memory or nullptr, if the operation @@ -733,9 +724,8 @@ public: //------------------------------------------------------------------ /// Get the symbol vendor interface for the current architecture. /// - /// If the symbol vendor file has not been located yet, this - /// function will find the best SymbolVendor plug-in that can - /// use the current object file. + /// If the symbol vendor file has not been located yet, this function will + /// find the best SymbolVendor plug-in that can use the current object file. /// /// @return /// If this module does not have a valid object file, or no @@ -758,11 +748,11 @@ public: TypeList *GetTypeList(); //------------------------------------------------------------------ - /// Get a pointer to the UUID value contained in this object. + /// 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 the file format, an MD5 checksum of the entire file, or - /// slice of the file for the current architecture should be used. + /// If the executable image file doesn't not have a UUID value built into + /// the file format, an MD5 checksum of the entire file, or slice of the + /// file for the current architecture should be used. /// /// @return /// A const pointer to the internal copy of the UUID value in @@ -775,14 +765,13 @@ public: /// A debugging function that will cause everything in a module to /// be parsed. /// - /// All compile units will be parsed, along with all globals and - /// static variables and all functions for those compile units. - /// All types, scopes, local variables, static variables, global - /// variables, and line tables will be parsed. This can be used - /// prior to dumping a module to see a 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. + /// All compile units will be parsed, along with all globals and static + /// variables and all functions for those compile units. All types, scopes, + /// local variables, static variables, global variables, and line tables + /// will be parsed. This can be used prior to dumping a module to see a + /// 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(); @@ -791,17 +780,16 @@ public: //------------------------------------------------------------------ /// Resolve the symbol context for the given address. /// - /// Tries to resolve the matching symbol context based on a lookup - /// from the current symbol vendor. If the lazy lookup fails, - /// an attempt is made to parse the eh_frame section to handle - /// stripped symbols. If this fails, an attempt is made to resolve - /// the symbol to the previous address to handle the case of a - /// function with a tail call. + /// Tries to resolve the matching symbol context based on a lookup from the + /// current symbol vendor. If the lazy lookup fails, an attempt is made to + /// parse the eh_frame section to handle stripped symbols. If this fails, + /// an attempt is made to resolve the symbol to the previous address to + /// handle the case of a function with a tail call. /// - /// Use properties of the modified SymbolContext to inspect any - /// resolved target, module, compilation unit, symbol, function, - /// function block or line entry. Use the return value to determine - /// which of these properties have been modified. + /// Use properties of the modified SymbolContext to inspect any resolved + /// target, module, compilation unit, symbol, function, function block or + /// line entry. Use the return value to determine which of these properties + /// have been modified. /// /// @param[in] so_addr /// A load address to resolve. @@ -836,15 +824,14 @@ public: //------------------------------------------------------------------ /// 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 contexts. + /// Tries to resolve \a file_path and \a line to a list of matching symbol + /// contexts. /// - /// The line table entries contains addresses that can be used to - /// further resolve the values in each match: the function, block, - /// symbol. Care should be taken to minimize the amount of - /// information that is requested to only what is needed -- - /// typically the module, compile unit, line table and line table - /// entry are sufficient. + /// The line table entries contains addresses that can be used to further + /// resolve the values in each match: the function, block, symbol. Care + /// should be taken to minimize the amount of information that is requested + /// to only what is needed -- typically the module, compile unit, line table + /// and line table entry are sufficient. /// /// @param[in] file_path /// A path to a source file to match. If \a file_path does not @@ -883,15 +870,14 @@ public: //------------------------------------------------------------------ /// 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 contexts. + /// Tries to resolve \a file_spec and \a line to a list of matching symbol + /// contexts. /// - /// The line table entries contains addresses that can be used to - /// further resolve the values in each match: the function, block, - /// symbol. Care should be taken to minimize the amount of - /// information that is requested to only what is needed -- - /// typically the module, compile unit, line table and line table - /// entry are sufficient. + /// The line table entries contains addresses that can be used to further + /// resolve the values in each match: the function, block, symbol. Care + /// should be taken to minimize the amount of information that is requested + /// to only what is needed -- typically the module, compile unit, line table + /// and line table entry are sufficient. /// /// @param[in] file_spec /// A file spec to a source file to match. If \a file_path does @@ -936,12 +922,10 @@ public: TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language); // Special error functions that can do printf style formatting that will - // prepend the message with - // something appropriate for this module (like the architecture, path and - // object name (if any)). - // This centralizes code so that everyone doesn't need to format their error - // and log messages on - // their own and keeps the output a bit more consistent. + // prepend the message with something appropriate for this module (like the + // architecture, path and object name (if any)). This centralizes code so + // that everyone doesn't need to format their error and log messages on their + // own and keeps the output a bit more consistent. void LogMessage(Log *log, const char *format, ...) __attribute__((format(printf, 3, 4))); @@ -960,15 +944,15 @@ public: __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. + // 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. + // SymbolVendor, SymbolFile and ObjectFile member objects should lock the + // module mutex to avoid deadlocks. //------------------------------------------------------------------ std::recursive_mutex &GetMutex() const { return m_mutex; } @@ -979,14 +963,13 @@ public: } //------------------------------------------------------------------ - /// Finds a source file given a file spec using the module source - /// path remappings (if any). + /// Finds a source file given a file spec using the module source path + /// remappings (if any). /// /// Tries to resolve \a orig_spec by checking the module source path - /// remappings. It makes sure the file exists, so this call can be - /// expensive if the remappings are on a network file system, so - /// use this function sparingly (not in a tight debug info parsing - /// loop). + /// remappings. It makes sure the file exists, so this call can be expensive + /// if the remappings are on a network file system, so use this function + /// sparingly (not in a tight debug info parsing loop). /// /// @param[in] orig_spec /// The original source file path to try and remap. @@ -1004,9 +987,9 @@ public: //------------------------------------------------------------------ /// Remaps a source file given \a path into \a new_path. /// - /// Remaps \a path if any source remappings match. This function - /// does NOT stat the file system so it can be used in tight loops - /// where debug info is being parsed. + /// Remaps \a path if any source remappings match. This function does NOT + /// stat the file system so it can be used in tight loops where debug info + /// is being parsed. /// /// @param[in] path /// The original source file path to try and remap. @@ -1021,43 +1004,28 @@ public: bool RemapSourceFile(llvm::StringRef path, std::string &new_path) const; bool RemapSourceFile(const char *, std::string &) const = delete; - //------------------------------------------------------------------ - /// Loads this module to memory. - /// - /// Loads the bits needed to create an executable image to the memory. - /// It is useful with bare-metal targets where target does not have the - /// ability to start a process itself. - /// - /// @param[in] target - /// Target where to load the module. - /// - /// @return - //------------------------------------------------------------------ - Status LoadInMemory(Target &target, bool set_pc); - //---------------------------------------------------------------------- /// @class LookupInfo Module.h "lldb/Core/Module.h" - /// @brief A class that encapsulates name lookup information. + /// A class that encapsulates name lookup information. /// - /// Users can type a wide variety of partial names when setting - /// breakpoints by name or when looking for functions by name. - /// SymbolVendor and SymbolFile objects are only required to implement - /// name lookup for function basenames and for fully mangled names. - /// This means if the user types in a partial name, we must reduce this - /// to a name lookup that will work with all SymbolFile objects. So we - /// might reduce a name lookup to look for a basename, and then prune - /// out any results that don't match. + /// Users can type a wide variety of partial names when setting breakpoints + /// by name or when looking for functions by name. SymbolVendor and + /// SymbolFile objects are only required to implement name lookup for + /// function basenames and for fully mangled names. This means if the user + /// types in a partial name, we must reduce this to a name lookup that will + /// work with all SymbolFile objects. So we might reduce a name lookup to + /// look for a basename, and then prune out any results that don't match. /// - /// The "m_name" member variable represents the name as it was typed - /// by the user. "m_lookup_name" will be the name we actually search - /// for through the symbol or objects files. Lanaguage is included in - /// case we need to filter results by language at a later date. The - /// "m_name_type_mask" member variable tells us what kinds of names we - /// are looking for and can help us prune out unwanted results. + /// The "m_name" member variable represents the name as it was typed by the + /// user. "m_lookup_name" will be the name we actually search for through + /// the symbol or objects files. Lanaguage is included in case we need to + /// filter results by language at a later date. The "m_name_type_mask" + /// member variable tells us what kinds of names we are looking for and can + /// help us prune out unwanted results. /// /// Function lookups are done in Module.cpp, ModuleList.cpp and in - /// BreakpointResolverName.cpp and they all now use this class to do - /// lookups correctly. + /// BreakpointResolverName.cpp and they all now use this class to do lookups + /// correctly. //---------------------------------------------------------------------- class LookupInfo { public: @@ -1146,7 +1114,7 @@ protected: std::atomic<bool> m_did_load_objfile{false}; std::atomic<bool> m_did_load_symbol_vendor{false}; - std::atomic<bool> m_did_parse_uuid{false}; + std::atomic<bool> m_did_set_uuid{false}; mutable bool m_file_has_changed : 1, m_first_file_changed_log : 1; /// See if the module was modified after it /// was initially opened. @@ -1156,9 +1124,9 @@ protected: /// /// Tries to resolve \a vm_addr as a file address (if \a /// vm_addr_is_file_addr is true) or as a load address if \a - /// vm_addr_is_file_addr is false) in the symbol vendor. - /// \a resolve_scope indicates what clients wish to resolve - /// and can be used to limit the scope of what is parsed. + /// vm_addr_is_file_addr is false) in the symbol vendor. \a resolve_scope + /// indicates what clients wish to resolve and can be used to limit the + /// scope of what is parsed. /// /// @param[in] vm_addr /// The load virtual address to resolve. @@ -1196,6 +1164,8 @@ protected: bool SetArchitecture(const ArchSpec &new_arch); + void SetUUID(const lldb_private::UUID &uuid); + SectionList *GetUnifiedSectionList(); friend class ModuleList; |
