Handle the possible case where the process launch failed

but we don't have an error message.

llvm-svn: 134662
This commit is contained in:
Jason Molenda
2011-07-08 00:00:32 +00:00
parent 9c6028f98e
commit 4e0c94be76

View File

@@ -228,12 +228,18 @@ RNBRunLoopLaunchInferior (RNBRemote *remote, const char *stdin_path, const char
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();