mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-07-03 23:40:47 -07:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user