From 65c67bb4a5d19d81048fd84c3ec599ff531629fd Mon Sep 17 00:00:00 2001 From: Thomas Guillemard Date: Mon, 8 Oct 2018 20:53:08 +0200 Subject: [PATCH] Break: don't crash when bit 31 is set (#444) --- Ryujinx.HLE/HOS/Kernel/SvcSystem.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Ryujinx.HLE/HOS/Kernel/SvcSystem.cs b/Ryujinx.HLE/HOS/Kernel/SvcSystem.cs index 8bcea550..396519fb 100644 --- a/Ryujinx.HLE/HOS/Kernel/SvcSystem.cs +++ b/Ryujinx.HLE/HOS/Kernel/SvcSystem.cs @@ -247,9 +247,17 @@ namespace Ryujinx.HLE.HOS.Kernel long Unknown = (long)ThreadState.X1; long Info = (long)ThreadState.X2; - Process.PrintStackTrace(ThreadState); + if ((Reason & (1 << 31)) == 0) + { + Process.PrintStackTrace(ThreadState); - throw new GuestBrokeExecutionException(); + throw new GuestBrokeExecutionException(); + } + else + { + Device.Log.PrintInfo(LogClass.KernelSvc, "Debugger triggered"); + Process.PrintStackTrace(ThreadState); + } } private void SvcOutputDebugString(AThreadState ThreadState)