gdb: [ci skip] just had a brain wave
This commit is contained in:
parent
71eb844dd8
commit
7d65611b96
2 changed files with 3 additions and 4 deletions
|
|
@ -28,10 +28,9 @@ namespace Ryujinx.HLE.Debugger
|
||||||
|
|
||||||
private static readonly Dictionary<string[], Func<Debugger, string>> _rcmdDelegates = new();
|
private static readonly Dictionary<string[], Func<Debugger, string>> _rcmdDelegates = new();
|
||||||
|
|
||||||
[CanBeNull]
|
|
||||||
public static Func<Debugger, string> FindRcmdDelegate(string command)
|
public static Func<Debugger, string> FindRcmdDelegate(string command)
|
||||||
{
|
{
|
||||||
Func<Debugger, string> searchResult = null;
|
Func<Debugger, string> searchResult = _ => $"Unknown command: {command}\n";
|
||||||
|
|
||||||
foreach ((string[] names, Func<Debugger, string> dlg) in _rcmdDelegates)
|
foreach ((string[] names, Func<Debugger, string> dlg) in _rcmdDelegates)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -422,9 +422,9 @@ namespace Ryujinx.HLE.Debugger.Gdb
|
||||||
string command = Helpers.FromHex(hexCommand);
|
string command = Helpers.FromHex(hexCommand);
|
||||||
Logger.Debug?.Print(LogClass.GdbStub, $"Received Rcmd: {command}");
|
Logger.Debug?.Print(LogClass.GdbStub, $"Received Rcmd: {command}");
|
||||||
|
|
||||||
var rcmdDelegate = Debugger.FindRcmdDelegate(command);
|
Func<Debugger, string> rcmd = Debugger.FindRcmdDelegate(command);
|
||||||
|
|
||||||
Processor.ReplyHex(rcmdDelegate?.Invoke(Debugger) ?? $"Unknown command: {command}\n");
|
Processor.ReplyHex(rcmd(Debugger));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue