[Lldb-commits] [lldb] Fix a bug with cancelling "attach -w" after you have run a process previously (PR #65822)

via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 8 22:08:13 PDT 2023


================
@@ -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();
----------------
bulbazord wrote:

Oh, I like that a lot. I'm a big fan of not doing unnecessary work. 😃 
Thanks for cleaning up and explaining!

https://github.com/llvm/llvm-project/pull/65822


More information about the lldb-commits mailing list