https://github.com/MrCirdo updated 
https://github.com/llvm/llvm-project/pull/165157

>From 1afd2876417f71edb960bd6aacfc548faa5f77de Mon Sep 17 00:00:00 2001
From: Odric Roux-Paris <[email protected]>
Date: Sat, 25 Oct 2025 23:36:39 +0200
Subject: [PATCH] [lldb] print errors when the debug server is not found

Previously, when the debug server binary could not be located, LLDB
emitted a vague error:
`error: executable doesn't exist: '(empty)'`

This patch adds a check just right after the debug server path
resolution and produces a clearer message if it's is not found:
`error: could not find 'lldb-server'. Please ensure it is properly
installed and available in your PATH`.
---
 lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp 
b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index b4422a7d58077..3c4d9a1f1ad37 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -3672,6 +3672,12 @@ Status ProcessGDBRemote::LaunchAndConnectToDebugserver(
     }
   }
 #endif
+
+  if (!FileSystem::Instance().Exists(debugserver_path))
+    return Status::FromErrorString("could not find '" DEBUGSERVER_BASENAME
+                                   "'. Please ensure it is properly installed "
+                                   "and available in your PATH");
+
   debugserver_launch_info.SetExecutableFile(debugserver_path,
                                             
/*add_exe_file_as_first_arg=*/true);
 

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to