Handle the possible case where the process launch failed
but we don't have an error message.
llvm-svn: 134662
diff --git a/lldb/tools/debugserver/source/debugserver.cpp b/lldb/tools/debugserver/source/debugserver.cpp
index 24e33e7..53f649d 100644
--- a/lldb/tools/debugserver/source/debugserver.cpp
+++ b/lldb/tools/debugserver/source/debugserver.cpp
@@ -228,12 +228,18 @@
g_pid = pid;
- if (pid == INVALID_NUB_PROCESS && strlen(launch_err_str) > 0)
+ if (pid == INVALID_NUB_PROCESS && strlen (launch_err_str) > 0)
{
DNBLogThreaded ("%s DNBProcessLaunch() returned error: '%s'", __FUNCTION__, launch_err_str);
ctx.LaunchStatus().SetError(-1, DNBError::Generic);
ctx.LaunchStatus().SetErrorString(launch_err_str);
}
+ else if (pid == INVALID_NUB_PROCESS)
+ {
+ DNBLogThreaded ("%s DNBProcessLaunch() failed to launch process, unknown failure", __FUNCTION__);
+ ctx.LaunchStatus().SetError(-1, DNBError::Generic);
+ ctx.LaunchStatus().SetErrorString(launch_err_str);
+ }
else
{
ctx.LaunchStatus().Clear();