From 4e0c94be76bb5d539ec22692bc432da12c7f7299 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Fri, 8 Jul 2011 00:00:32 +0000 Subject: Handle the possible case where the process launch failed but we don't have an error message. llvm-svn: 134662 --- lldb/tools/debugserver/source/debugserver.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lldb/tools/debugserver/source/debugserver.cpp') diff --git a/lldb/tools/debugserver/source/debugserver.cpp b/lldb/tools/debugserver/source/debugserver.cpp index 24e33e72a0e..53f649d9505 100644 --- a/lldb/tools/debugserver/source/debugserver.cpp +++ b/lldb/tools/debugserver/source/debugserver.cpp @@ -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(); -- cgit v1.2.3