From e551dda17e1a9bf9233ad1859d3f6ba0fe299062 Mon Sep 17 00:00:00 2001 From: Coxxs <58-coxxs@users.noreply.git.ryujinx.app> Date: Mon, 20 Oct 2025 21:35:55 -0500 Subject: [PATCH] gdb: fix IsProcess32Bit throws exception if called too early (ryubing/ryujinx!185) See merge request ryubing/ryujinx!185 --- src/Ryujinx.HLE/Debugger/Debugger.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.HLE/Debugger/Debugger.cs b/src/Ryujinx.HLE/Debugger/Debugger.cs index 76c9e0f8d..567e97071 100644 --- a/src/Ryujinx.HLE/Debugger/Debugger.cs +++ b/src/Ryujinx.HLE/Debugger/Debugger.cs @@ -57,8 +57,8 @@ namespace Ryujinx.HLE.Debugger internal KThread[] GetThreads() => DebugProcess.ThreadUids.Select(DebugProcess.GetThread).ToArray(); - internal bool IsProcess32Bit => DebugProcess.GetThread(GThread.Value).Context.IsAarch32; - + internal bool IsProcess32Bit => DebugProcess.GetThread(GThread ?? DebugProcess.ThreadUids.First()).Context.IsAarch32; + internal bool WriteRegister(IExecutionContext ctx, int registerId, StringStream ss) => IsProcess32Bit ? ctx.WriteRegister32(registerId, ss)