[Lldb-commits] [lldb] [lldb] Return Expected<ModuleSP> from Process::ReadModuleFromMemory (PR #179583)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 4 00:24:09 PST 2026


================
@@ -722,19 +729,27 @@ bool DynamicLoaderDarwin::AddModulesUsingPreloadedModules(
                                                                true /* notify */);
               if (!commpage_image_module_sp ||
                   commpage_image_module_sp->GetObjectFile() == nullptr) {
-                commpage_image_module_sp = m_process->ReadModuleFromMemory(
-                    image_info.file_spec, image_info.address);
-                // Always load a memory image right away in the target in case
-                // we end up trying to read the symbol table from memory... The
-                // __LINKEDIT will need to be mapped so we can figure out where
-                // the symbol table bits are...
-                bool changed = false;
-                UpdateImageLoadAddress(commpage_image_module_sp.get(),
-                                       image_info);
-                target.GetImages().Append(commpage_image_module_sp);
-                if (changed) {
-                  image_info.load_stop_id = m_process->GetStopID();
-                  loaded_module_list.AppendIfNeeded(commpage_image_module_sp);
+                llvm::Expected<ModuleSP> module_sp_or_err =
----------------
Michael137 wrote:

It looks like `UpdateImageLoadAddress` may be doing something with the input `image_info` even if the module is NULL? I don't know enough about the specifics to know if it's fine to skip. But this would technically be behaviour changing?

https://github.com/llvm/llvm-project/pull/179583


More information about the lldb-commits mailing list