Implement qThreadExtraInfo

This commit is contained in:
merry 2022-02-19 16:12:19 +00:00
parent 645959c490
commit 0ac11c2b5d
3 changed files with 27 additions and 1 deletions

View file

@ -1,6 +1,6 @@
namespace ARMeilleure.State
{
enum DebugState
public enum DebugState
{
Running,
Stopping,

View file

@ -168,6 +168,11 @@ namespace ARMeilleure.State
_debugHalt.Set();
}
public DebugState GetDebugState()
{
return (DebugState)_debugState;
}
internal void OnBreak(ulong address, int imm)
{
Break?.Invoke(this, new InstExceptionEventArgs(address, imm));

View file

@ -297,6 +297,27 @@ namespace Ryujinx.HLE.Debugger
break;
}
if (ss.ConsumePrefix("ThreadExtraInfo,"))
{
ulong? threadId = ss.ReadRemainingAsThreadUid();
if (threadId == null)
{
ReplyError();
break;
}
ExecutionContext ctx = GetThread(threadId.Value);
if (ctx.GetDebugState() == DebugState.Stopped)
{
Reply(ToHex("Stopped"));
}
else
{
Reply(ToHex("Not stopped"));
}
break;
}
if (ss.ConsumePrefix("Xfer:features:read:"))
{
string feature = ss.ReadUntil(':');