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

Adrian McCarthy amccarth at google.com
Tue Feb 24 16:24:38 PST 2015


Hi zturner,

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

Found while diagnosing test problems.

http://reviews.llvm.org/D7874

Files:
  source/Plugins/Process/Windows/ProcessWindows.cpp

Index: source/Plugins/Process/Windows/ProcessWindows.cpp
===================================================================
--- source/Plugins/Process/Windows/ProcessWindows.cpp
+++ source/Plugins/Process/Windows/ProcessWindows.cpp
@@ -222,7 +222,11 @@
     {
         // 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);
     }

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7874.20636.patch
Type: text/x-patch
Size: 715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150225/b40ef7ed/attachment.bin>


More information about the lldb-commits mailing list