[Lldb-commits] [lldb] r230523 - Solve hang on Windows when lldb fails to launch the process.

Zachary Turner zturner at google.com
Wed Feb 25 10:56:48 PST 2015


Author: zturner
Date: Wed Feb 25 12:56:47 2015
New Revision: 230523

URL: http://llvm.org/viewvc/llvm-project?rev=230523&view=rev
Log:
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

Modified:
    lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp

Modified: lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp?rev=230523&r1=230522&r2=230523&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp Wed Feb 25 12:56:47 2015
@@ -222,7 +222,11 @@ ProcessWindows::DoLaunch(Module *exe_mod
     {
         // 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);
     }





More information about the lldb-commits mailing list