Solve hang on Windows when lldb fails to launch the process.

The DebuggerThread was detecting the launch error, but it was
ignored by ProcessWindows::DoLaunch, causing LLDB to wait forever
in the debugger loop.

This fixes the test case that explicitly attempts to launch a
process from a non-existant path.

Patch by Adrian McCarthy
Differential Revision: http://reviews.llvm.org/D7874

llvm-svn: 230523
This commit is contained in:
Zachary Turner 2015-02-25 18:56:47 +00:00
parent 171d943ac5
commit 00998f0beb
1 changed files with 4 additions and 0 deletions

View File

@ -222,7 +222,11 @@ ProcessWindows::DoLaunch(Module *exe_module,
{
// Block this function until we receive the initial stop from the process.
if (::WaitForSingleObject(m_session_data->m_initial_stop_event, INFINITE) == WAIT_OBJECT_0)
{
process = debugger->GetProcess();
if (m_session_data->m_launch_error.Fail())
result = m_session_data->m_launch_error;
}
else
result.SetError(::GetLastError(), eErrorTypeWin32);
}