gdb: More cleanup changes

- Move the message handler into its debugger class part,
- Move all message types into one file and collapse 3 of the ones with no data into a generic, stateless message with a single property being its type,
- Add an Fpscr helper property on IExecutionContext along with a comment about what Fpscr is (similar to the other registers in there)
- Moved the Rcmd helpers (such as GetRegisters, GetMinidump, etc) into a dedicated Debugger class part,
- Fixed the double-collection (ToArray being called twice) in GetThreadUids & GetThread in KProcess
This commit is contained in:
GreemDev 2025-10-19 04:26:12 -05:00
parent 6058af5119
commit 247e2e03d6
19 changed files with 319 additions and 328 deletions

View file

@ -1338,22 +1338,24 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
return true;
}
public DebugState GetDebugState()
{
return (DebugState)_parent.debugState;
}
public DebugState DebugState => (DebugState)_parent.debugState;
public bool IsThreadPaused(KThread target)
{
return (target.SchedFlags & ThreadSchedState.ThreadPauseFlag) != 0;
}
public ulong[] GetThreadUids()
public ulong[] ThreadUids
{
lock (_parent._threadingLock)
get
{
var threads = _parent._threads.Where(x => !x.TerminationRequested).ToArray();
return threads.Select(x => x.ThreadUid).ToArray();
lock (_parent._threadingLock)
{
return _parent._threads
.Where(x => !x.TerminationRequested)
.Select(x => x.ThreadUid)
.ToArray();
}
}
}
@ -1361,8 +1363,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
{
lock (_parent._threadingLock)
{
var threads = _parent._threads.Where(x => !x.TerminationRequested).ToArray();
return threads.FirstOrDefault(x => x.ThreadUid == threadUid);
return _parent._threads.Where(x => !x.TerminationRequested)
.FirstOrDefault(x => x.ThreadUid == threadUid);
}
}
@ -1379,7 +1381,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
_parent.InterruptHandler(ctx);
}
public IVirtualMemoryManager CpuMemory { get { return _parent.CpuMemory; } }
public IVirtualMemoryManager CpuMemory => _parent.CpuMemory;
public void InvalidateCacheRegion(ulong address, ulong size)
{