From c12a32c5401c050d0a9581e426d091b7e4d30211 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sun, 2 Feb 2020 19:02:45 +0000 Subject: [PATCH] thermosphere: fix sending bug when handling ctrl-c --- thermosphere/src/gdb/debug.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/thermosphere/src/gdb/debug.c b/thermosphere/src/gdb/debug.c index 9b2c2bfe2..4d54e25e9 100644 --- a/thermosphere/src/gdb/debug.c +++ b/thermosphere/src/gdb/debug.c @@ -540,7 +540,13 @@ GDB_DECLARE_VERBOSE_HANDLER(Continue) // "Note: In non-stop mode, a thread is considered running until GDB acknowledges // an asynchronous stop notification for it with the ‘vStopped’ packet (see Remote Non-Stop)." - u32 mask = GDB_IsNonStop(ctx) ? ctx->acknowledgedDebugEventCoreList : ctx->attachedCoreList; + u32 mask; + if (GDB_IsNonStop(ctx)) { + mask = ctx->acknowledgedDebugEventCoreList; + } else { + mask = ctx->attachedCoreList; + ctx->sendOwnDebugEventDisallowed = (continueCoreList & mask) == 0; + } debugManagerSetSingleStepCoreList(stepCoreList & mask); debugManagerBreakCores(stopCoreList & ~mask);