[PATCH] D47609: [lldb, process] Fix occasional hang when launching a process in LLDB

Stella Stamenova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 1 10:13:54 PDT 2018


stella.stamenova updated this revision to Diff 149505.
stella.stamenova added a comment.

Rather than going with a generic solution, remove the change to private state to launching. This change also updates a comment that had ended up in the wrong place.


Repository:
  rL LLVM

https://reviews.llvm.org/D47609

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


Index: source/Target/Process.cpp
===================================================================
--- source/Target/Process.cpp
+++ source/Target/Process.cpp
@@ -2688,8 +2688,7 @@
 Process::WaitForProcessStopPrivate(EventSP &event_sp,
                                    const Timeout<std::micro> &timeout) {
   StateType state;
-  // Now wait for the process to launch and return control to us, and then call
-  // DidLaunch:
+
   while (true) {
     event_sp.reset();
     state = GetStateChangedEventsPrivate(event_sp, timeout);
@@ -2767,6 +2766,9 @@
           }
         } else {
           EventSP event_sp;
+
+          // Now wait for the process to launch and return control to us, and then call
+          // DidLaunch:
           StateType state = WaitForProcessStopPrivate(event_sp, seconds(10));
 
           if (state == eStateInvalid || !event_sp) {
Index: source/Plugins/Process/Windows/Common/ProcessWindows.cpp
===================================================================
--- source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -249,7 +249,6 @@
   bool stop_at_entry = launch_info.GetFlags().Test(eLaunchFlagStopAtEntry);
   m_session_data.reset(new ProcessWindowsData(stop_at_entry));
 
-  SetPrivateState(eStateLaunching);
   DebugDelegateSP delegate(new LocalDebugDelegate(shared_from_this()));
   m_session_data->m_debugger.reset(new DebuggerThread(delegate));
   DebuggerThreadSP debugger = m_session_data->m_debugger;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47609.149505.patch
Type: text/x-patch
Size: 1521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180601/de8dfc54/attachment.bin>


More information about the llvm-commits mailing list