Debugger: Do more stuff

# Conflicts:
#	src/Ryujinx.HLE/Debugger/Debugger.cs
#	src/Ryujinx.HLE/Debugger/GdbXml/aarch64-core.xml
#	src/Ryujinx.HLE/Debugger/GdbXml/aarch64-fpu.xml
#	src/Ryujinx.HLE/Debugger/GdbXml/target.xml
#	src/Ryujinx.HLE/Debugger/RegisterInformation.cs
This commit is contained in:
merry
2022-02-09 21:29:53 +00:00
committed by svc64
parent 1bb8f6381c
commit a1de4f1b5b
7 changed files with 470 additions and 47 deletions

View File

@ -1,4 +1,5 @@
using System.Globalization;
using System.Diagnostics;
using System.Globalization;
namespace Ryujinx.HLE.Debugger
{
@ -60,6 +61,39 @@ namespace Ryujinx.HLE.Debugger
return ulong.Parse(ReadLength(len), NumberStyles.HexNumber);
}
public ulong ReadLengthAsLEHex(int len)
{
Debug.Assert(len % 2 == 0);
ulong result = 0;
int pos = 0;
while (pos < len)
{
result += ReadLengthAsHex(2) << (4 * pos);
pos += 2;
}
return result;
}
public bool ConsumePrefix(string prefix)
{
if (Data.Substring(Position).StartsWith(prefix))
{
Position += prefix.Length;
return true;
}
return false;
}
public bool ConsumeRemaining(string match)
{
if (Data.Substring(Position) == match)
{
Position += match.Length;
return true;
}
return false;
}
public bool IsEmpty()
{
return Position >= Data.Length;