[Lldb-commits] [lldb] [lldb] Enable locate module callback for main executable (PR #160199)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 5 12:22:39 PST 2025


================
@@ -767,9 +763,18 @@ Platform::ResolveExecutable(const ModuleSpec &module_spec,
   Status error;
   for (const ArchSpec &arch : GetSupportedArchitectures(process_host_arch)) {
     resolved_module_spec.GetArchitecture() = arch;
-    error =
-        ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
-                                    module_search_paths_ptr, nullptr, nullptr);
+
+    // Call locate module callback first, then fallback to standard path.
+    FileSpec symbol_file_spec;
+    CallLocateModuleCallbackIfSet(resolved_module_spec, exe_module_sp,
+                                  symbol_file_spec, nullptr);
+
+    if (!exe_module_sp)
+      error = ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
+                                          nullptr, nullptr);
+
+    error = ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp,
+                                        nullptr, nullptr);
----------------
clayborg wrote:

What are we calling this twice? 

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


More information about the lldb-commits mailing list