================
@@ -3156,23 +3156,22 @@ Status Process::Halt(bool clear_thread_plans, bool 
use_run_lock) {
   // case it was already set and some thread plan logic calls halt on its own.
   m_clear_thread_plans_on_stop |= clear_thread_plans;
 
-  ListenerSP halt_listener_sp(
-      Listener::MakeListener("lldb.process.halt_listener"));
-  HijackProcessEvents(halt_listener_sp);
-
-  EventSP event_sp;
-
-  SendAsyncInterrupt();
-
   if (m_public_state.GetValue() == eStateAttaching) {
     // Don't hijack and eat the eStateExited as the code that was doing the
     // attach will be waiting for this event...
-    RestoreProcessEvents();
----------------
jimingham wrote:

If we find we're attaching we never actually hijack the process listener.  In 
that case in the old code we make a hijack listener, hijacked the process 
listener, then checked that we were attaching, and so needed not to have done 
all that.  RestoreProcessEvents is the call that undoes that unnecessary work.  
So I moved making and hijacking the process to after this check, in which case 
RestoreProcessEvents is wrong, since it would remove a hijacker we didn't add.

That was an unrelated drive-by fix...

https://github.com/llvm/llvm-project/pull/65822
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to