thermosphere: GDB_TrySignalDebugEvent, do nothing if not attached

This commit is contained in:
TuxSH committed 2020-02-04 19:12:23 +00:00
1 parent 52c3397b19
commit ba9b99713f
1 file changed
+9
+9
View File
@@ -206,6 +206,15 @@ int GDB_TrySignalDebugEvent(GDBContext *ctx, DebugEventInfo *info)
// Acquire the gdb lock/disable rx irq. We most likely block here.
GDB_AcquireContext(ctx);
// Is the context not attached?
if (!GDB_IsAttached(ctx)) {
// Not attached, mark the event as handled, unpause
debugManagerMarkAndGetCoreDebugEvent(info->coreId);
debugManagerUnpauseCores(BIT(info->coreId), 0);
GDB_ReleaseContext(ctx);
return -1;
}
// Are we still paused & has the packet not been handled & are we allowed to send on our own?
if (ctx->sendOwnDebugEventAllowed && !info->handled && debugManagerIsCorePaused(info->coreId)) {