From 7d65611b96e1035eebd29a0fa7e4e554bba96fea Mon Sep 17 00:00:00 2001 From: GreemDev Date: Mon, 20 Oct 2025 21:20:41 -0500 Subject: [PATCH] gdb: [ci skip] just had a brain wave --- src/Ryujinx.HLE/Debugger/Debugger.Rcmd.cs | 3 +-- src/Ryujinx.HLE/Debugger/Gdb/Commands.cs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Ryujinx.HLE/Debugger/Debugger.Rcmd.cs b/src/Ryujinx.HLE/Debugger/Debugger.Rcmd.cs index d2c8cd513..f63817ef3 100644 --- a/src/Ryujinx.HLE/Debugger/Debugger.Rcmd.cs +++ b/src/Ryujinx.HLE/Debugger/Debugger.Rcmd.cs @@ -28,10 +28,9 @@ namespace Ryujinx.HLE.Debugger private static readonly Dictionary> _rcmdDelegates = new(); - [CanBeNull] public static Func FindRcmdDelegate(string command) { - Func searchResult = null; + Func searchResult = _ => $"Unknown command: {command}\n"; foreach ((string[] names, Func dlg) in _rcmdDelegates) { diff --git a/src/Ryujinx.HLE/Debugger/Gdb/Commands.cs b/src/Ryujinx.HLE/Debugger/Gdb/Commands.cs index 4a1fe3c93..a7cefce2e 100644 --- a/src/Ryujinx.HLE/Debugger/Gdb/Commands.cs +++ b/src/Ryujinx.HLE/Debugger/Gdb/Commands.cs @@ -422,9 +422,9 @@ namespace Ryujinx.HLE.Debugger.Gdb string command = Helpers.FromHex(hexCommand); Logger.Debug?.Print(LogClass.GdbStub, $"Received Rcmd: {command}"); - var rcmdDelegate = Debugger.FindRcmdDelegate(command); + Func rcmd = Debugger.FindRcmdDelegate(command); - Processor.ReplyHex(rcmdDelegate?.Invoke(Debugger) ?? $"Unknown command: {command}\n"); + Processor.ReplyHex(rcmd(Debugger)); } catch (Exception e) {