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

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 1 16:03:46 PDT 2025


================
@@ -1303,9 +1309,16 @@ PlatformDarwin::LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) {
 
 lldb_private::Status PlatformDarwin::FindBundleBinaryInExecSearchPaths(
     const ModuleSpec &module_spec, Process *process, ModuleSP &module_sp,
-    const FileSpecList *module_search_paths_ptr,
     llvm::SmallVectorImpl<ModuleSP> *old_modules, bool *did_create_ptr) {
   const FileSpec &platform_file = module_spec.GetFileSpec();
+  ModuleSpec module_spec_copy(module_spec);
+  Target *target = module_spec_copy.GetTargetPtr();
+  FileSpecList module_search_paths;
+  FileSpecList *module_search_paths_ptr = nullptr;
----------------
JDevlieghere wrote:

Seems like you don't need `module_search_paths_ptr` anymore and you can just take the address of `module_search_paths`? Instead of checking the pointer below you could check if it's empty?

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


More information about the lldb-commits mailing list