[Lldb-commits] [lldb] Send an explicit interrupt to cancel an attach waitfor. (PR #72565)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 16 13:40:04 PST 2023


================
@@ -3843,6 +3843,13 @@ thread_result_t Process::RunPrivateStateThread(bool is_secondary_thread) {
                   ") woke up with an interrupt while attaching - "
                   "forwarding interrupt.",
                   __FUNCTION__, static_cast<void *>(this), GetID());
+        // The server may be spinning waiting for a process to appear, in which
+        // case we should tell it to stop doing that.  Normally, we don't NEED
+        // to do that because we will next close the communication to the stub
+        // and that will get it to shut down.  But there are remote debugging
+        // cases where relying on that side-effect causes the shutdown to be 
+        // flakey, so we should send a positive signal to interrupt the wait. 
+        Status error = HaltPrivate();
----------------
JDevlieghere wrote:

Should we log the return value?

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


More information about the lldb-commits mailing list