mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-14 17:00:17 +00:00
threadUid is now ulong
This commit is contained in:
parent
d0afc6605f
commit
ef92c9c5e4
6 changed files with 17 additions and 14 deletions
|
@ -57,6 +57,8 @@ namespace ARMeilleure.State
|
|||
|
||||
public bool IsAarch32 { get; set; }
|
||||
|
||||
public ulong ThreadUid { get; set; }
|
||||
|
||||
internal ExecutionMode ExecutionMode
|
||||
{
|
||||
get
|
||||
|
|
|
@ -25,8 +25,8 @@ namespace Ryujinx.HLE.Debugger
|
|||
private Thread SocketThread;
|
||||
private Thread HandlerThread;
|
||||
|
||||
private long? cThread;
|
||||
private long? gThread;
|
||||
private ulong? cThread;
|
||||
private ulong? gThread;
|
||||
|
||||
public Debugger(Switch device, ushort port)
|
||||
{
|
||||
|
@ -42,9 +42,9 @@ namespace Ryujinx.HLE.Debugger
|
|||
}
|
||||
|
||||
private void HaltApplication() => Device.System.DebugGetApplicationProcess().DebugStopAllThreads();
|
||||
private long[] GetThreadIds() => Device.System.DebugGetApplicationProcess().DebugGetThreadUids();
|
||||
private ulong[] GetThreadIds() => Device.System.DebugGetApplicationProcess().DebugGetThreadUids();
|
||||
|
||||
private ARMeilleure.State.ExecutionContext GetThread(long threadUid) =>
|
||||
private ARMeilleure.State.ExecutionContext GetThread(ulong threadUid) =>
|
||||
Device.System.DebugGetApplicationProcess().DebugGetThreadContext(threadUid);
|
||||
private ARMeilleure.State.ExecutionContext[] GetThreads() => GetThreadIds().Select(GetThread).ToArray();
|
||||
private IVirtualMemoryManager GetMemory() => Device.System.DebugGetApplicationProcess().CpuMemory;
|
||||
|
@ -188,7 +188,7 @@ namespace Ryujinx.HLE.Debugger
|
|||
case 'H':
|
||||
{
|
||||
char op = ss.ReadChar();
|
||||
long? threadId = ss.ReadRemainingAsThreadUid();
|
||||
ulong? threadId = ss.ReadRemainingAsThreadUid();
|
||||
CommandSetThread(op, threadId);
|
||||
break;
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ namespace Ryujinx.HLE.Debugger
|
|||
break;
|
||||
case 'T':
|
||||
{
|
||||
long? threadId = ss.ReadRemainingAsThreadUid();
|
||||
ulong? threadId = ss.ReadRemainingAsThreadUid();
|
||||
CommandIsAlive(threadId);
|
||||
break;
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ namespace Ryujinx.HLE.Debugger
|
|||
}
|
||||
}
|
||||
|
||||
void CommandSetThread(char op, long? threadId)
|
||||
void CommandSetThread(char op, ulong? threadId)
|
||||
{
|
||||
if (threadId == 0)
|
||||
{
|
||||
|
@ -506,7 +506,7 @@ namespace Ryujinx.HLE.Debugger
|
|||
Reply($"T00thread:{ctx.ThreadUid:x};");
|
||||
}
|
||||
|
||||
private void CommandIsAlive(long? threadId)
|
||||
private void CommandIsAlive(ulong? threadId)
|
||||
{
|
||||
if (GetThreads().Any(x => x.ThreadUid == threadId))
|
||||
{
|
||||
|
|
|
@ -5,8 +5,8 @@ namespace Ryujinx.HLE.Debugger
|
|||
public interface IDebuggableProcess
|
||||
{
|
||||
void DebugStopAllThreads();
|
||||
long[] DebugGetThreadUids();
|
||||
ARMeilleure.State.ExecutionContext DebugGetThreadContext(long threadUid);
|
||||
ulong[] DebugGetThreadUids();
|
||||
ARMeilleure.State.ExecutionContext DebugGetThreadContext(ulong threadUid);
|
||||
IVirtualMemoryManager CpuMemory { get; }
|
||||
void InvalidateCacheRegion(ulong address, ulong size);
|
||||
}
|
||||
|
|
|
@ -75,10 +75,10 @@ namespace Ryujinx.HLE.Debugger
|
|||
return result;
|
||||
}
|
||||
|
||||
public long? ReadRemainingAsThreadUid()
|
||||
public ulong? ReadRemainingAsThreadUid()
|
||||
{
|
||||
string s = ReadRemaining();
|
||||
return s == "-1" ? null : long.Parse(s, NumberStyles.HexNumber);
|
||||
return s == "-1" ? null : ulong.Parse(s, NumberStyles.HexNumber);
|
||||
}
|
||||
|
||||
public bool ConsumePrefix(string prefix)
|
||||
|
|
|
@ -1213,7 +1213,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
}
|
||||
}
|
||||
|
||||
public long[] DebugGetThreadUids()
|
||||
public ulong[] DebugGetThreadUids()
|
||||
{
|
||||
lock (_parent._threadingLock)
|
||||
{
|
||||
|
@ -1221,7 +1221,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
}
|
||||
}
|
||||
|
||||
public ARMeilleure.State.ExecutionContext DebugGetThreadContext(long threadUid)
|
||||
public ARMeilleure.State.ExecutionContext DebugGetThreadContext(ulong threadUid)
|
||||
{
|
||||
lock (_parent._threadingLock)
|
||||
{
|
||||
|
|
|
@ -212,6 +212,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||
Context.Tpidr = (long)_tlsAddress;
|
||||
|
||||
ThreadUid = KernelContext.NewThreadUid();
|
||||
Context.ThreadUid = ThreadUid;
|
||||
|
||||
HostThread.Name = customThreadStart != null ? $"HLE.OsThread.{ThreadUid}" : $"HLE.GuestThread.{ThreadUid}";
|
||||
|
||||
|
|
Loading…
Reference in a new issue