[Lldb-commits] [lldb] [lldb] Give thread specific async interrupt requests a lifetime (PR #224272)
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 17 04:39:40 PDT 2026
================
@@ -4460,7 +4465,25 @@ Process::RunPrivateStateThread(PrivateStateThread::Purpose purpose) {
continue;
} else if (event_sp->GetType() == eBroadcastBitInterrupt) {
- if (GetPublicState() == eStateAttaching) {
+ // Claim the request this event was sent for. A thread specific request
+ // (i.e. one coming from a thread plan rather than from the user) is only
+ // meaningful for the execution that was in flight when it was made: if
+ // the process has stopped since then, whatever the requestor wanted to
+ // interrupt is over. Interrupting the next resume instead would stop the
+ // process for a reason no thread plan can explain, which surfaces to the
+ // user as a spurious stop.
+ auto [interrupt_tid, stop_id] =
+ std::exchange(*m_pending_interrupt.Lock(), {});
----------------
Teemperor wrote:
We should have a `Pop` function or similar to make this less ugly.
https://github.com/llvm/llvm-project/pull/224272
More information about the lldb-commits
mailing list