Formatting
This commit is contained in:
parent
60e2a9dd00
commit
f9156756c9
5 changed files with 13 additions and 17 deletions
|
@ -49,6 +49,7 @@ namespace Ryujinx.HLE.Debugger
|
||||||
|
|
||||||
private IDebuggableProcess DebugProcess => Device.System.DebugGetApplicationProcess();
|
private IDebuggableProcess DebugProcess => Device.System.DebugGetApplicationProcess();
|
||||||
private KThread[] GetThreads() => DebugProcess.GetThreadUids().Select(x => DebugProcess.GetThread(x)).ToArray();
|
private KThread[] GetThreads() => DebugProcess.GetThreadUids().Select(x => DebugProcess.GetThread(x)).ToArray();
|
||||||
|
private bool IsProcessAarch32 => DebugProcess.GetThread(gThread.Value).Context.IsAarch32;
|
||||||
private KernelContext KernelContext => Device.System.KernelContext;
|
private KernelContext KernelContext => Device.System.KernelContext;
|
||||||
|
|
||||||
const int GdbRegisterCount64 = 68;
|
const int GdbRegisterCount64 = 68;
|
||||||
|
@ -328,7 +329,7 @@ namespace Ryujinx.HLE.Debugger
|
||||||
|
|
||||||
if (ss.ConsumeRemaining("HostInfo"))
|
if (ss.ConsumeRemaining("HostInfo"))
|
||||||
{
|
{
|
||||||
if (IsProcessAarch32())
|
if (IsProcessAarch32)
|
||||||
{
|
{
|
||||||
Reply(
|
Reply(
|
||||||
$"triple:{ToHex("arm-unknown-linux-android")};endian:little;ptrsize:4;hostname:{ToHex("Ryujinx")};");
|
$"triple:{ToHex("arm-unknown-linux-android")};endian:little;ptrsize:4;hostname:{ToHex("Ryujinx")};");
|
||||||
|
@ -343,7 +344,7 @@ namespace Ryujinx.HLE.Debugger
|
||||||
|
|
||||||
if (ss.ConsumeRemaining("ProcessInfo"))
|
if (ss.ConsumeRemaining("ProcessInfo"))
|
||||||
{
|
{
|
||||||
if (IsProcessAarch32())
|
if (IsProcessAarch32)
|
||||||
{
|
{
|
||||||
Reply(
|
Reply(
|
||||||
$"pid:1;cputype:12;cpusubtype:0;triple:{ToHex("arm-unknown-linux-android")};ostype:unknown;vendor:none;endian:little;ptrsize:4;");
|
$"pid:1;cputype:12;cpusubtype:0;triple:{ToHex("arm-unknown-linux-android")};ostype:unknown;vendor:none;endian:little;ptrsize:4;");
|
||||||
|
@ -402,7 +403,7 @@ namespace Ryujinx.HLE.Debugger
|
||||||
|
|
||||||
if (feature == "target.xml")
|
if (feature == "target.xml")
|
||||||
{
|
{
|
||||||
feature = IsProcessAarch32() ? "target32.xml" : "target64.xml";
|
feature = IsProcessAarch32 ? "target32.xml" : "target64.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
string data;
|
string data;
|
||||||
|
@ -492,7 +493,7 @@ namespace Ryujinx.HLE.Debugger
|
||||||
|
|
||||||
var ctx = DebugProcess.GetThread(gThread.Value).Context;
|
var ctx = DebugProcess.GetThread(gThread.Value).Context;
|
||||||
string registers = "";
|
string registers = "";
|
||||||
if (IsProcessAarch32())
|
if (IsProcessAarch32)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < GdbRegisterCount32; i++)
|
for (int i = 0; i < GdbRegisterCount32; i++)
|
||||||
{
|
{
|
||||||
|
@ -519,7 +520,7 @@ namespace Ryujinx.HLE.Debugger
|
||||||
}
|
}
|
||||||
|
|
||||||
var ctx = DebugProcess.GetThread(gThread.Value).Context;
|
var ctx = DebugProcess.GetThread(gThread.Value).Context;
|
||||||
if (IsProcessAarch32())
|
if (IsProcessAarch32)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < GdbRegisterCount32; i++)
|
for (int i = 0; i < GdbRegisterCount32; i++)
|
||||||
{
|
{
|
||||||
|
@ -625,7 +626,7 @@ namespace Ryujinx.HLE.Debugger
|
||||||
|
|
||||||
var ctx = DebugProcess.GetThread(gThread.Value).Context;
|
var ctx = DebugProcess.GetThread(gThread.Value).Context;
|
||||||
string result;
|
string result;
|
||||||
if (IsProcessAarch32())
|
if (IsProcessAarch32)
|
||||||
{
|
{
|
||||||
result = GdbReadRegister32(ctx, gdbRegId);
|
result = GdbReadRegister32(ctx, gdbRegId);
|
||||||
if (result != null)
|
if (result != null)
|
||||||
|
@ -660,7 +661,7 @@ namespace Ryujinx.HLE.Debugger
|
||||||
}
|
}
|
||||||
|
|
||||||
var ctx = DebugProcess.GetThread(gThread.Value).Context;
|
var ctx = DebugProcess.GetThread(gThread.Value).Context;
|
||||||
if (IsProcessAarch32())
|
if (IsProcessAarch32)
|
||||||
{
|
{
|
||||||
if (GdbWriteRegister32(ctx, gdbRegId, ss) && ss.IsEmpty())
|
if (GdbWriteRegister32(ctx, gdbRegId, ss) && ss.IsEmpty())
|
||||||
{
|
{
|
||||||
|
@ -817,11 +818,6 @@ namespace Ryujinx.HLE.Debugger
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsProcessAarch32()
|
|
||||||
{
|
|
||||||
return DebugProcess.GetThread(gThread.Value).Context.IsAarch32;
|
|
||||||
}
|
|
||||||
|
|
||||||
private byte CalculateChecksum(string cmd)
|
private byte CalculateChecksum(string cmd)
|
||||||
{
|
{
|
||||||
byte checksum = 0;
|
byte checksum = 0;
|
||||||
|
|
Loading…
Reference in a new issue