mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-14 16:06:56 +00:00
thermosphere: GDB_TrySignalDebugEvent, do nothing if not attached
This commit is contained in:
parent
71401b0731
commit
c0252e07f6
1 changed files with 9 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue