Implement qThreadExtraInfo

This commit is contained in:
merry 2022-02-19 16:12:19 +00:00 committed by svc64
parent 7e4944cc88
commit 8bd4417b24
9 changed files with 50 additions and 1 deletions

View file

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

View file

@ -139,6 +139,9 @@ namespace Ryujinx.Cpu.AppleHv
/// <inheritdoc/>
public void DebugContinue() => _impl.DebugContinue();
/// <inheritdoc/>
public DebugState GetDebugState() => _impl.GetDebugState();
/// <inheritdoc/>
public ulong DebugPc
{

View file

@ -68,6 +68,11 @@ namespace Ryujinx.Cpu.AppleHv
{
}
public DebugState GetDebugState()
{
return DebugState.Stopped;
}
public bool GetAndClearInterruptRequested()
{
return false;

View file

@ -228,6 +228,11 @@ namespace Ryujinx.Cpu.AppleHv
HvApi.hv_vcpu_run(_vcpu);
}
public DebugState GetDebugState()
{
return (DebugState)_debugState;
}
public bool GetAndClearInterruptRequested()
{
return Interlocked.Exchange(ref _interruptRequested, 0) != 0;

View file

@ -47,6 +47,7 @@ namespace Ryujinx.Cpu.AppleHv
void DebugStop();
bool DebugStep();
void DebugContinue();
DebugState GetDebugState();
ulong DebugPc { get; set; }
}

View file

@ -118,6 +118,7 @@ namespace Ryujinx.Cpu
void DebugStop();
bool DebugStep();
void DebugContinue();
DebugState GetDebugState();
ulong DebugPc { get; set; }
}

View file

@ -125,6 +125,9 @@ namespace Ryujinx.Cpu.Jit
/// <inheritdoc/>
public void DebugContinue() => _impl.DebugContinue();
/// <inheritdoc/>
public DebugState GetDebugState() => _impl.GetDebugState();
/// <inheritdoc/>
public ulong DebugPc
{

View file

@ -295,6 +295,27 @@ namespace Ryujinx.HLE.Debugger
break;
}
if (ss.ConsumePrefix("ThreadExtraInfo,"))
{
ulong? threadId = ss.ReadRemainingAsThreadUid();
if (threadId == null)
{
ReplyError();
break;
}
IExecutionContext 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(':');

View file

@ -48,6 +48,11 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
{
}
public DebugState GetDebugState()
{
return DebugState.Stopped;
}
public void StopRunning()
{
Running = false;