From 35a8116ae8ec98a0a4981cfe955a2509f7059f0e Mon Sep 17 00:00:00 2001 From: Coxxs <58-coxxs@users.noreply.git.ryujinx.app> Date: Thu, 16 Oct 2025 07:49:41 -0500 Subject: [PATCH] gdb: Do not skip CheckInterrupt when gdb stub is enabled When GDB stub is enabled, CheckSynchronization is called too frequently because it skips _nativeContext.SetCounter(MinCountForCheck) (called in CheckInterrupt()), causing CheckSynchronization to be constantly called in JIT. This could cause performance issue. It also skips the call to the KProcess.InterruptHandler, which causes some games to deadlock when GDB stub is enabled. I'm not sure if this change will cause any side effects, but it seems GDB stub is still working correctly after this change. This change will not affect regular users. --- src/ARMeilleure/Instructions/NativeInterface.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ARMeilleure/Instructions/NativeInterface.cs b/src/ARMeilleure/Instructions/NativeInterface.cs index 5c38a4cd3..9d6279613 100644 --- a/src/ARMeilleure/Instructions/NativeInterface.cs +++ b/src/ARMeilleure/Instructions/NativeInterface.cs @@ -200,11 +200,7 @@ namespace ARMeilleure.Instructions ExecutionContext context = GetContext(); - // If debugging, we'll handle interrupts outside - if (!Optimizations.EnableDebugging) - { - context.CheckInterrupt(); - } + context.CheckInterrupt(); Statistics.ResumeTimer();