Skip to content

Commit 3e8f9f9

Browse files
committed
[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`.
1 parent 8c29bce commit 3e8f9f9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3656,6 +3656,12 @@ Status ProcessGDBRemote::LaunchAndConnectToDebugserver(
36563656

36573657
FileSpec debugserver_path = GetDebugserverPath(*GetTarget().GetPlatform());
36583658

3659+
if (!FileSystem::Instance().Exists(debugserver_path)) {
3660+
return Status::FromErrorString("Could not find '" DEBUGSERVER_BASENAME
3661+
"'. Please ensure it is properly installed "
3662+
"and available in your PATH.");
3663+
}
3664+
36593665
#if defined(__APPLE__)
36603666
// On macOS 11, we need to support x86_64 applications translated to
36613667
// arm64. We check whether a binary is translated and spawn the correct

0 commit comments

Comments
 (0)