mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-17 02:35:47 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -293,7 +293,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
||||
KThread currentThread = KernelStatic.GetCurrentThread();
|
||||
KThread selectedThread = _state.SelectedThread;
|
||||
|
||||
if (!currentThread.IsThreadNamed && currentThread.GetThreadName() != "")
|
||||
if (!currentThread.IsThreadNamed && string.IsNullOrEmpty(currentThread.GetThreadName()))
|
||||
{
|
||||
currentThread.HostThread.Name = $"<{currentThread.GetThreadName()}>";
|
||||
currentThread.IsThreadNamed = true;
|
||||
|
||||
Reference in New Issue
Block a user