https://github.com/MrCirdo created https://github.com/llvm/llvm-project/pull/165157
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`. >From 3e8f9f90030638cfea2544acc389ff58dc7e30cc 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..324864a732882 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -3656,6 +3656,12 @@ Status ProcessGDBRemote::LaunchAndConnectToDebugserver( FileSpec debugserver_path = GetDebugserverPath(*GetTarget().GetPlatform()); + 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."); + } + #if defined(__APPLE__) // On macOS 11, we need to support x86_64 applications translated to // arm64. We check whether a binary is translated and spawn the correct _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
