1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-18 16:32:05 +00:00

thermosphere: GDB_TrySignalDebugEvent, do nothing if not attached

This commit is contained in:
TuxSH 2020-01-28 01:18:17 +00:00
parent 71401b0731
commit c0252e07f6

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)) {