KLapshin removed rL LLVM as the repository for this revision.
KLapshin updated this revision to Diff 35491.

http://reviews.llvm.org/D12968

Files:
  source/Target/Process.cpp

Index: source/Target/Process.cpp
===================================================================
--- source/Target/Process.cpp
+++ source/Target/Process.cpp
@@ -3930,8 +3930,16 @@
         // Consume the interrupt event.
         TimeValue timeout (TimeValue::Now());
         timeout.OffsetWithSeconds(10);
-        StateType state = WaitForProcessToStop (&timeout, &exit_event_sp);
 
+        ListenerSP listener_sp (new 
Listener("lldb.Process.StopForDestroyOrDetach.hijack"));
+        HijackProcessEvents(listener_sp.get());
+
+        StateType state = WaitForProcessToStop (&timeout, &exit_event_sp, 
true, listener_sp.get());
+
+        // Don't forget to notify other listeners.
+        RestoreProcessEvents();
+        BroadcastEvent(exit_event_sp);
+
         // If the process exited while we were waiting for it to stop, put the 
exited event into
         // the shared pointer passed in and return.  Our caller doesn't need 
to do anything else, since
         // they don't have a process anymore...


Index: source/Target/Process.cpp
===================================================================
--- source/Target/Process.cpp
+++ source/Target/Process.cpp
@@ -3930,8 +3930,16 @@
         // Consume the interrupt event.
         TimeValue timeout (TimeValue::Now());
         timeout.OffsetWithSeconds(10);
-        StateType state = WaitForProcessToStop (&timeout, &exit_event_sp);
 
+        ListenerSP listener_sp (new Listener("lldb.Process.StopForDestroyOrDetach.hijack"));
+        HijackProcessEvents(listener_sp.get());
+
+        StateType state = WaitForProcessToStop (&timeout, &exit_event_sp, true, listener_sp.get());
+
+        // Don't forget to notify other listeners.
+        RestoreProcessEvents();
+        BroadcastEvent(exit_event_sp);
+
         // If the process exited while we were waiting for it to stop, put the exited event into
         // the shared pointer passed in and return.  Our caller doesn't need to do anything else, since
         // they don't have a process anymore...
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to