From f9156756c9cd6116a0906ec2b9d1832253d0f095 Mon Sep 17 00:00:00 2001 From: svc64 Date: Wed, 27 Dec 2023 16:33:47 +0100 Subject: [PATCH] Formatting --- src/ARMeilleure/State/ExecutionContext.cs | 2 +- src/Ryujinx.Cpu/Jit/JitExecutionContext.cs | 2 +- src/Ryujinx.HLE/Debugger/Debugger.cs | 22 ++++++++----------- src/Ryujinx.HLE/HLEConfiguration.cs | 2 +- .../HOS/Kernel/Process/KProcess.cs | 2 +- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/ARMeilleure/State/ExecutionContext.cs b/src/ARMeilleure/State/ExecutionContext.cs index 4fa322eef..1d78b40db 100644 --- a/src/ARMeilleure/State/ExecutionContext.cs +++ b/src/ARMeilleure/State/ExecutionContext.cs @@ -160,7 +160,7 @@ namespace ARMeilleure.State { _stepCallback.Invoke(this); } - + public void RequestDebugStep() { Interlocked.Exchange(ref ShouldStep, 1); diff --git a/src/Ryujinx.Cpu/Jit/JitExecutionContext.cs b/src/Ryujinx.Cpu/Jit/JitExecutionContext.cs index 7bae07859..d4775f3ed 100644 --- a/src/Ryujinx.Cpu/Jit/JitExecutionContext.cs +++ b/src/Ryujinx.Cpu/Jit/JitExecutionContext.cs @@ -107,7 +107,7 @@ namespace Ryujinx.Cpu.Jit { _exceptionCallbacks.StepCallback?.Invoke(this); } - + private void SupervisorCallHandler(ExecutionContext context, ulong address, int imm) { _exceptionCallbacks.SupervisorCallback?.Invoke(this, address, imm); diff --git a/src/Ryujinx.HLE/Debugger/Debugger.cs b/src/Ryujinx.HLE/Debugger/Debugger.cs index e9f535440..89a193da4 100644 --- a/src/Ryujinx.HLE/Debugger/Debugger.cs +++ b/src/Ryujinx.HLE/Debugger/Debugger.cs @@ -49,6 +49,7 @@ namespace Ryujinx.HLE.Debugger private IDebuggableProcess DebugProcess => Device.System.DebugGetApplicationProcess(); 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; const int GdbRegisterCount64 = 68; @@ -57,7 +58,7 @@ namespace Ryujinx.HLE.Debugger All of FPCR's bits are reserved in FPCR and vice versa, see ARM's documentation. */ private const uint FpcrMask = 0xfc1fffff; - + private string GdbReadRegister64(IExecutionContext state, int gdbRegId) { switch (gdbRegId) @@ -328,7 +329,7 @@ namespace Ryujinx.HLE.Debugger if (ss.ConsumeRemaining("HostInfo")) { - if (IsProcessAarch32()) + if (IsProcessAarch32) { Reply( $"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 (IsProcessAarch32()) + if (IsProcessAarch32) { Reply( $"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") { - feature = IsProcessAarch32() ? "target32.xml" : "target64.xml"; + feature = IsProcessAarch32 ? "target32.xml" : "target64.xml"; } string data; @@ -492,7 +493,7 @@ namespace Ryujinx.HLE.Debugger var ctx = DebugProcess.GetThread(gThread.Value).Context; string registers = ""; - if (IsProcessAarch32()) + if (IsProcessAarch32) { for (int i = 0; i < GdbRegisterCount32; i++) { @@ -519,7 +520,7 @@ namespace Ryujinx.HLE.Debugger } var ctx = DebugProcess.GetThread(gThread.Value).Context; - if (IsProcessAarch32()) + if (IsProcessAarch32) { for (int i = 0; i < GdbRegisterCount32; i++) { @@ -625,7 +626,7 @@ namespace Ryujinx.HLE.Debugger var ctx = DebugProcess.GetThread(gThread.Value).Context; string result; - if (IsProcessAarch32()) + if (IsProcessAarch32) { result = GdbReadRegister32(ctx, gdbRegId); if (result != null) @@ -660,7 +661,7 @@ namespace Ryujinx.HLE.Debugger } var ctx = DebugProcess.GetThread(gThread.Value).Context; - if (IsProcessAarch32()) + if (IsProcessAarch32) { 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) { byte checksum = 0; diff --git a/src/Ryujinx.HLE/HLEConfiguration.cs b/src/Ryujinx.HLE/HLEConfiguration.cs index 368bcc9dd..1660ae16a 100644 --- a/src/Ryujinx.HLE/HLEConfiguration.cs +++ b/src/Ryujinx.HLE/HLEConfiguration.cs @@ -183,7 +183,7 @@ namespace Ryujinx.HLE /// Suspend execution when starting an application /// public bool DebuggerSuspendOnStart { get; internal set; } - + public HLEConfiguration(VirtualFileSystem virtualFileSystem, LibHacHorizonManager libHacHorizonManager, ContentManager contentManager, diff --git a/src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs b/src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs index 9586a8080..0d3a7541c 100644 --- a/src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs +++ b/src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs @@ -1231,7 +1231,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process } } - _parent.debugState = (int)DebugState.Stopped; + _parent.debugState = (int)DebugState.Stopped; _kernelContext.CriticalSection.Leave(); }