Skip to content

Commit 704d83d

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 d0a7411 commit 704d83d

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
@@ -3672,6 +3672,12 @@ Status ProcessGDBRemote::LaunchAndConnectToDebugserver(
36723672
}
36733673
}
36743674
#endif
3675+
3676+
if (!FileSystem::Instance().Exists(debugserver_path))
3677+
return Status::FromErrorString("could not find '" DEBUGSERVER_BASENAME
3678+
"'. Please ensure it is properly installed "
3679+
"and available in your PATH");
3680+
36753681
debugserver_launch_info.SetExecutableFile(debugserver_path,
36763682
/*add_exe_file_as_first_arg=*/true);
36773683

0 commit comments

Comments
 (0)