Index: include/lldb/Core/Module.h =================================================================== --- include/lldb/Core/Module.h +++ include/lldb/Core/Module.h @@ -40,6 +40,9 @@ /// The module will parse more detailed information as more queries are /// made. //---------------------------------------------------------------------- + +class Process; + class Module : public std::enable_shared_from_this, public SymbolContextScope @@ -91,8 +94,8 @@ lldb::offset_t object_offset = 0, const TimeValue *object_mod_time_ptr = NULL); - Module (const ModuleSpec &module_spec); - + Module (const ModuleSpec &module_spec, Process *process=nullptr); + static lldb::ModuleSP CreateJITModule (const lldb::ObjectFileJITDelegateSP &delegate_sp); @@ -996,7 +999,13 @@ { return m_source_mappings; } - + + const lldb::ProcessSP + GetProcess () const + { + return m_process.lock (); + } + //------------------------------------------------------------------ /// Finds a source file given a file spec using the module source /// path remappings (if any). @@ -1103,6 +1112,7 @@ 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 + lldb::ProcessWP m_process; ///< Optional process reference. ConstString m_object_name; ///< The name an object within this module that is selected, or empty of the module is represented by \a m_file. uint64_t m_object_offset; TimeValue m_object_mod_time; Index: include/lldb/Symbol/ObjectFile.h =================================================================== --- include/lldb/Symbol/ObjectFile.h +++ include/lldb/Symbol/ObjectFile.h @@ -68,6 +68,9 @@ /// Once an architecture is selected the object file information can be /// extracted from this abstract class. //---------------------------------------------------------------------- + +class Process; + class ObjectFile: public std::enable_shared_from_this, public PluginInterface, @@ -107,8 +110,8 @@ /// supplied upon construction. The at an offset within a file for /// objects that contain more than one architecture or object. //------------------------------------------------------------------ - ObjectFile (const lldb::ModuleSP &module_sp, - const FileSpec *file_spec_ptr, + ObjectFile (const lldb::ModuleSP &module_sp, + const FileSpec *file_spec_ptr, lldb::offset_t file_offset, lldb::offset_t length, const lldb::DataBufferSP& data_sp, @@ -203,6 +206,7 @@ GetModuleSpecifications (const FileSpec &file, lldb::offset_t file_offset, lldb::offset_t file_size, + Process* process, ModuleSpecList &specs); static size_t @@ -211,6 +215,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t file_size, + Process* process, lldb_private::ModuleSpecList &specs); //------------------------------------------------------------------ /// Split a path into a file path with object name. Index: include/lldb/Target/Platform.h =================================================================== --- include/lldb/Target/Platform.h +++ include/lldb/Target/Platform.h @@ -1152,6 +1152,7 @@ bool GetCachedSharedModule (const ModuleSpec& module_spec, + Process* process, lldb::ModuleSP &module_sp, bool *did_create_ptr); Index: include/lldb/lldb-private-interfaces.h =================================================================== --- include/lldb/lldb-private-interfaces.h +++ include/lldb/lldb-private-interfaces.h @@ -21,7 +21,7 @@ typedef DynamicLoader* (*DynamicLoaderCreateInstance) (Process* process, bool force); typedef lldb::JITLoaderSP (*JITLoaderCreateInstance) (Process *process, bool force); typedef ObjectContainer* (*ObjectContainerCreateInstance) (const lldb::ModuleSP &module_sp, lldb::DataBufferSP& data_sp, lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t offset, lldb::offset_t length); - typedef size_t (*ObjectFileGetModuleSpecifications) (const FileSpec &file, lldb::DataBufferSP& data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, ModuleSpecList &module_specs); + typedef size_t (*ObjectFileGetModuleSpecifications) (const FileSpec &file, lldb::DataBufferSP& data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, Process* process, ModuleSpecList &module_specs); typedef ObjectFile* (*ObjectFileCreateInstance) (const lldb::ModuleSP &module_sp, lldb::DataBufferSP& data_sp, lldb::offset_t data_offset, const FileSpec* file, lldb::offset_t file_offset, lldb::offset_t length); typedef ObjectFile* (*ObjectFileCreateMemoryInstance) (const lldb::ModuleSP &module_sp, lldb::DataBufferSP& data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t offset); typedef bool (*ObjectFileSaveCore) (const lldb::ProcessSP &process_sp, const FileSpec &outfile, Error &error); Index: source/API/SBModuleSpec.cpp =================================================================== --- source/API/SBModuleSpec.cpp +++ source/API/SBModuleSpec.cpp @@ -175,7 +175,7 @@ SBModuleSpecList specs; FileSpec file_spec(path, true); Host::ResolveExecutableInBundle(file_spec); - ObjectFile::GetModuleSpecifications(file_spec, 0, 0, *specs.m_opaque_ap); + ObjectFile::GetModuleSpecifications(file_spec, 0, 0, nullptr, *specs.m_opaque_ap); return specs; } Index: source/Commands/CommandObjectTarget.cpp =================================================================== --- source/Commands/CommandObjectTarget.cpp +++ source/Commands/CommandObjectTarget.cpp @@ -4465,7 +4465,7 @@ size_t num_matches = 0; // First extract all module specs from the symbol file lldb_private::ModuleSpecList symfile_module_specs; - if (ObjectFile::GetModuleSpecifications(module_spec.GetSymbolFileSpec(), 0, 0, symfile_module_specs)) + if (ObjectFile::GetModuleSpecifications(module_spec.GetSymbolFileSpec(), 0, 0, nullptr, symfile_module_specs)) { // Now extract the module spec that matches the target architecture ModuleSpec target_arch_module_spec; Index: source/Core/Module.cpp =================================================================== --- source/Core/Module.cpp +++ source/Core/Module.cpp @@ -134,7 +134,7 @@ #endif -Module::Module (const ModuleSpec &module_spec) : +Module::Module (const ModuleSpec &module_spec, Process *process) : m_mutex (Mutex::eMutexTypeRecursive), m_mod_time (), m_arch (), @@ -174,10 +174,14 @@ module_spec.GetObjectName().IsEmpty() ? "" : module_spec.GetObjectName().AsCString(""), module_spec.GetObjectName().IsEmpty() ? "" : ")"); + if (process) + { + m_process = process->shared_from_this(); + } // First extract all module specifications from the file using the local // file path. If there are no specifications, then don't fill anything in ModuleSpecList modules_specs; - if (ObjectFile::GetModuleSpecifications(module_spec.GetFileSpec(), 0, 0, modules_specs) == 0) + if (ObjectFile::GetModuleSpecifications(module_spec.GetFileSpec(), 0, 0, process, modules_specs) == 0) return; // Now make sure that one of the module specifications matches what we just Index: source/Host/common/Symbols.cpp =================================================================== --- source/Host/common/Symbols.cpp +++ source/Host/common/Symbols.cpp @@ -95,7 +95,7 @@ if (file_spec.Exists()) { lldb_private::ModuleSpecList specs; - const size_t num_specs = ObjectFile::GetModuleSpecifications (file_spec, 0, 0, specs); + const size_t num_specs = ObjectFile::GetModuleSpecifications (file_spec, 0, 0, nullptr, specs); assert (num_specs <= 1 && "Symbol Vendor supports only a single architecture"); if (num_specs == 1) { Index: source/Host/linux/Host.cpp =================================================================== --- source/Host/linux/Host.cpp +++ source/Host/linux/Host.cpp @@ -271,7 +271,7 @@ ModuleSpecList specs; FileSpec filespec (exe_path, false); - const size_t num_specs = ObjectFile::GetModuleSpecifications (filespec, 0, 0, specs); + const size_t num_specs = ObjectFile::GetModuleSpecifications (filespec, 0, 0, nullptr, specs); // GetModuleSpecifications() could fail if the executable has been deleted or is locked. // But it shouldn't return more than 1 architecture. assert(num_specs <= 1 && "Linux plugin supports only a single architecture"); Index: source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h =================================================================== --- source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h +++ source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h @@ -52,6 +52,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs); static bool Index: source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp =================================================================== --- source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -553,6 +553,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t file_size, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs) { @@ -589,6 +590,7 @@ if (ObjectFile::GetModuleSpecifications(file, object_file_offset, file_size - object_file_offset, + process, specs)) { ModuleSpec &spec = specs.GetModuleSpecRefAtIndex (specs.GetSize() - 1); Index: source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h =================================================================== --- source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h +++ source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h @@ -48,6 +48,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs); static bool Index: source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp =================================================================== --- source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp +++ source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp @@ -279,6 +279,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t file_size, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs) { const size_t initial_count = specs.GetSize(); @@ -300,6 +301,7 @@ ObjectFile::GetModuleSpecifications (file, slice_file_offset, file_size - slice_file_offset, + process, specs); } } Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.h =================================================================== --- source/Plugins/ObjectFile/ELF/ObjectFileELF.h +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.h @@ -94,6 +94,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs); static bool @@ -293,6 +294,7 @@ GetSectionHeaderInfo(SectionHeaderColl §ion_headers, lldb_private::DataExtractor &data, const elf::ELFHeader &header, + lldb_private::Process* process, lldb_private::UUID &uuid, std::string &gnu_debuglink_file, uint32_t &gnu_debuglink_crc, Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -25,6 +25,7 @@ #include "lldb/Core/Timer.h" #include "lldb/Symbol/DWARFCallFrameInfo.h" #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Target/Process.h" #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" #include "lldb/Host/HostInfo.h" @@ -616,6 +617,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MODULES)); @@ -671,7 +673,7 @@ SectionHeaderColl section_headers; lldb_private::UUID &uuid = spec.GetUUID(); - GetSectionHeaderInfo(section_headers, data, header, uuid, gnu_debuglink_file, gnu_debuglink_crc, spec.GetArchitecture ()); + GetSectionHeaderInfo(section_headers, data, header, process, uuid, gnu_debuglink_file, gnu_debuglink_crc, spec.GetArchitecture ()); // If the module vendor is not set and the module OS matches this host OS, set the module vendor to the host vendor. llvm::Triple &spec_triple = spec.GetArchitecture ().GetTriple (); @@ -1377,6 +1379,7 @@ ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers, lldb_private::DataExtractor &object_data, const elf::ELFHeader &header, + lldb_private::Process* process, lldb_private::UUID &uuid, std::string &gnu_debuglink_file, uint32_t &gnu_debuglink_crc, @@ -1393,28 +1396,37 @@ const uint32_t sub_type = subTypeFromElfHeader(header); arch_spec.SetArchitecture (eArchTypeELF, header.e_machine, sub_type); - switch (arch_spec.GetAddressByteSize()) + if (process && process->GetTarget ().GetArchitecture ().GetCore () == arch_spec.GetCore ()) { - case 4: + const auto& proc_arch = process->GetTarget ().GetArchitecture ().GetTriple (); + arch_spec.GetTriple ().setOS(proc_arch.getOS ()); + arch_spec.GetTriple ().setVendor(proc_arch.getVendor ()); + } + else + { + switch (arch_spec.GetAddressByteSize()) { - const ArchSpec host_arch32 = HostInfo::GetArchitecture(HostInfo::eArchKind32); - if (host_arch32.GetCore() == arch_spec.GetCore()) + case 4: { - arch_spec.GetTriple().setOSName(HostInfo::GetOSString().data()); - arch_spec.GetTriple().setVendorName(HostInfo::GetVendorString().data()); + const ArchSpec host_arch32 = HostInfo::GetArchitecture(HostInfo::eArchKind32); + if (host_arch32.GetCore() == arch_spec.GetCore()) + { + arch_spec.GetTriple().setOSName(HostInfo::GetOSString().data()); + arch_spec.GetTriple().setVendorName(HostInfo::GetVendorString().data()); + } } - } - break; - case 8: - { - const ArchSpec host_arch64 = HostInfo::GetArchitecture(HostInfo::eArchKind64); - if (host_arch64.GetCore() == arch_spec.GetCore()) + break; + case 8: { - arch_spec.GetTriple().setOSName(HostInfo::GetOSString().data()); - arch_spec.GetTriple().setVendorName(HostInfo::GetVendorString().data()); + const ArchSpec host_arch64 = HostInfo::GetArchitecture(HostInfo::eArchKind64); + if (host_arch64.GetCore() == arch_spec.GetCore()) + { + arch_spec.GetTriple().setOSName(HostInfo::GetOSString().data()); + arch_spec.GetTriple().setVendorName(HostInfo::GetVendorString().data()); + } } + break; } - break; } } @@ -1549,7 +1561,9 @@ size_t ObjectFileELF::ParseSectionHeaders() { - return GetSectionHeaderInfo(m_section_headers, m_data, m_header, m_uuid, m_gnu_debuglink_file, m_gnu_debuglink_crc, m_arch_spec); + const auto process_sp = m_process_wp.lock (); + return GetSectionHeaderInfo( + m_section_headers, m_data, m_header, process_sp.get (), m_uuid, m_gnu_debuglink_file, m_gnu_debuglink_crc, m_arch_spec); } const ObjectFileELF::ELFSectionHeaderInfo * Index: source/Plugins/ObjectFile/JIT/ObjectFileJIT.h =================================================================== --- source/Plugins/ObjectFile/JIT/ObjectFileJIT.h +++ source/Plugins/ObjectFile/JIT/ObjectFileJIT.h @@ -57,6 +57,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs); //------------------------------------------------------------------ Index: source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp =================================================================== --- source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp +++ source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp @@ -102,6 +102,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs) { // JIT'ed object file can't be read from a file on disk Index: source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h =================================================================== --- source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h +++ source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h @@ -62,6 +62,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs); static bool Index: source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp =================================================================== --- source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -971,6 +971,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs) { const size_t initial_count = specs.GetSize(); Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h =================================================================== --- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h +++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h @@ -79,6 +79,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs); static bool Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp =================================================================== --- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -107,6 +107,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, + lldb_private::Process* process, lldb_private::ModuleSpecList &specs) { const size_t initial_count = specs.GetSize(); Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -1168,7 +1168,7 @@ const ModuleSpec module_spec(module_path_spec, arch); ModuleSpecList module_specs; - if (!ObjectFile::GetModuleSpecifications(module_path_spec, 0, 0, module_specs)) + if (!ObjectFile::GetModuleSpecifications(module_path_spec, 0, 0, nullptr, module_specs)) return SendErrorResponse (3); ModuleSpec matched_module_spec; Index: source/Symbol/ObjectFile.cpp =================================================================== --- source/Symbol/ObjectFile.cpp +++ source/Symbol/ObjectFile.cpp @@ -188,6 +188,7 @@ ObjectFile::GetModuleSpecifications (const FileSpec &file, lldb::offset_t file_offset, lldb::offset_t file_size, + Process* process, ModuleSpecList &specs) { DataBufferSP data_sp (file.ReadFileContents(file_offset, 512)); @@ -204,6 +205,7 @@ 0, // data offset file_offset,// file offset file_size, // file length + process, // process - can be null specs); } return 0; @@ -215,6 +217,7 @@ lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t file_size, + Process* process, lldb_private::ModuleSpecList &specs) { const size_t initial_count = specs.GetSize(); @@ -223,14 +226,14 @@ // Try the ObjectFile plug-ins for (i = 0; (callback = PluginManager::GetObjectFileGetModuleSpecificationsCallbackAtIndex(i)) != nullptr; ++i) { - if (callback (file, data_sp, data_offset, file_offset, file_size, specs) > 0) + if (callback (file, data_sp, data_offset, file_offset, file_size, process, specs) > 0) return specs.GetSize() - initial_count; } // Try the ObjectContainer plug-ins for (i = 0; (callback = PluginManager::GetObjectContainerGetModuleSpecificationsCallbackAtIndex(i)) != nullptr; ++i) { - if (callback (file, data_sp, data_offset, file_offset, file_size, specs) > 0) + if (callback (file, data_sp, data_offset, file_offset, file_size, process, specs) > 0) return specs.GetSize() - initial_count; } return 0; @@ -251,7 +254,7 @@ m_length (length), m_data (), m_unwind_table (*this), - m_process_wp(), + m_process_wp(module_sp->GetProcess ()), m_memory_addr (LLDB_INVALID_ADDRESS), m_sections_ap(), m_symtab_ap () Index: source/Target/Platform.cpp =================================================================== --- source/Target/Platform.cpp +++ source/Target/Platform.cpp @@ -277,7 +277,7 @@ ModuleSpec &module_spec) { ModuleSpecList module_specs; - if (ObjectFile::GetModuleSpecifications (module_file_spec, 0, 0, module_specs) == 0) + if (ObjectFile::GetModuleSpecifications (module_file_spec, 0, 0, nullptr, module_specs) == 0) return false; ModuleSpec matched_module_spec; @@ -1817,7 +1817,7 @@ const auto error = module_resolver (resolved_module_spec); if (error.Fail ()) { - if (GetCachedSharedModule (resolved_module_spec, module_sp, did_create_ptr)) + if (GetCachedSharedModule (resolved_module_spec, process, module_sp, did_create_ptr)) return Error (); } @@ -1826,6 +1826,7 @@ bool Platform::GetCachedSharedModule (const ModuleSpec &module_spec, + Process* process, lldb::ModuleSP &module_sp, bool *did_create_ptr) { @@ -1856,6 +1857,7 @@ tmp_download_file_spec); }, + process, module_sp, did_create_ptr); if (error.Success ()) Index: source/Target/TargetList.cpp =================================================================== --- source/Target/TargetList.cpp +++ source/Target/TargetList.cpp @@ -158,7 +158,7 @@ lldb::offset_t file_offset = 0; lldb::offset_t file_size = 0; - const size_t num_specs = ObjectFile::GetModuleSpecifications (module_spec.GetFileSpec(), file_offset, file_size, module_specs); + const size_t num_specs = ObjectFile::GetModuleSpecifications (module_spec.GetFileSpec(), file_offset, file_size, nullptr, module_specs); if (num_specs > 0) { ModuleSpec matching_module_spec; Index: source/Utility/ModuleCache.h =================================================================== --- source/Utility/ModuleCache.h +++ source/Utility/ModuleCache.h @@ -23,6 +23,7 @@ namespace lldb_private { class Module; +class Process; class UUID; //---------------------------------------------------------------------- @@ -57,6 +58,7 @@ Get (const FileSpec &root_dir_spec, const char *hostname, const ModuleSpec &module_spec, + Process* process, lldb::ModuleSP &cached_module_sp, bool *did_create_ptr); @@ -65,6 +67,7 @@ const char *hostname, const ModuleSpec &module_spec, const Downloader &downloader, + Process* process, lldb::ModuleSP &cached_module_sp, bool *did_create_ptr); Index: source/Utility/ModuleCache.cpp =================================================================== --- source/Utility/ModuleCache.cpp +++ source/Utility/ModuleCache.cpp @@ -83,6 +83,7 @@ ModuleCache::Get (const FileSpec &root_dir_spec, const char *hostname, const ModuleSpec &module_spec, + Process* process, ModuleSP &cached_module_sp, bool *did_create_ptr) { @@ -110,7 +111,7 @@ cached_module_spec.GetUUID ().Clear (); // Clear UUID since it may contain md5 content hash instead of real UUID. cached_module_spec.GetFileSpec () = module_file_path; cached_module_spec.GetPlatformFileSpec () = module_spec.GetFileSpec (); - cached_module_sp.reset (new Module (cached_module_spec)); + cached_module_sp.reset (new Module (cached_module_spec, process)); if (did_create_ptr) *did_create_ptr = true; @@ -124,6 +125,7 @@ const char *hostname, const ModuleSpec &module_spec, const Downloader &downloader, + Process* process, lldb::ModuleSP &cached_module_sp, bool *did_create_ptr) { @@ -131,6 +133,7 @@ auto error = Get (root_dir_spec, hostname, module_spec, + process, cached_module_sp, did_create_ptr); if (error.Success ()) @@ -153,6 +156,7 @@ return Get (root_dir_spec, hostname, module_spec, + process, cached_module_sp, did_create_ptr); }