diff --git a/src/ARMeilleure/State/ExecutionContext.cs b/src/ARMeilleure/State/ExecutionContext.cs
index e4e9cd0e1..47c864bfe 100644
--- a/src/ARMeilleure/State/ExecutionContext.cs
+++ b/src/ARMeilleure/State/ExecutionContext.cs
@@ -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);
diff --git a/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs b/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs
index 77a981b10..e6e33ea6b 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs
@@ -139,6 +139,9 @@ namespace Ryujinx.Cpu.AppleHv
///
public void DebugContinue() => _impl.DebugContinue();
+ ///
+ public DebugState GetDebugState() => _impl.GetDebugState();
+
///
public ulong DebugPc
{
diff --git a/src/Ryujinx.Cpu/AppleHv/HvExecutionContextShadow.cs b/src/Ryujinx.Cpu/AppleHv/HvExecutionContextShadow.cs
index 034795f08..24eefc42d 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvExecutionContextShadow.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvExecutionContextShadow.cs
@@ -68,6 +68,11 @@ namespace Ryujinx.Cpu.AppleHv
{
}
+ public DebugState GetDebugState()
+ {
+ return DebugState.Stopped;
+ }
+
public bool GetAndClearInterruptRequested()
{
return false;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs b/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
index 690a5f30d..03d426331 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
@@ -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;
diff --git a/src/Ryujinx.Cpu/AppleHv/IHvExecutionContext.cs b/src/Ryujinx.Cpu/AppleHv/IHvExecutionContext.cs
index 17be8cc45..f49509db9 100644
--- a/src/Ryujinx.Cpu/AppleHv/IHvExecutionContext.cs
+++ b/src/Ryujinx.Cpu/AppleHv/IHvExecutionContext.cs
@@ -47,6 +47,7 @@ namespace Ryujinx.Cpu.AppleHv
void DebugStop();
bool DebugStep();
void DebugContinue();
+ DebugState GetDebugState();
ulong DebugPc { get; set; }
}
diff --git a/src/Ryujinx.Cpu/IExecutionContext.cs b/src/Ryujinx.Cpu/IExecutionContext.cs
index b44c4f318..6df28292e 100644
--- a/src/Ryujinx.Cpu/IExecutionContext.cs
+++ b/src/Ryujinx.Cpu/IExecutionContext.cs
@@ -118,7 +118,8 @@ namespace Ryujinx.Cpu
void DebugStop();
bool DebugStep();
void DebugContinue();
-
+ DebugState GetDebugState();
+
ulong DebugPc { get; set; }
}
}
diff --git a/src/Ryujinx.Cpu/Jit/JitExecutionContext.cs b/src/Ryujinx.Cpu/Jit/JitExecutionContext.cs
index 2f3e0d59b..1a8d54c96 100644
--- a/src/Ryujinx.Cpu/Jit/JitExecutionContext.cs
+++ b/src/Ryujinx.Cpu/Jit/JitExecutionContext.cs
@@ -125,6 +125,9 @@ namespace Ryujinx.Cpu.Jit
///
public void DebugContinue() => _impl.DebugContinue();
+ ///
+ public DebugState GetDebugState() => _impl.GetDebugState();
+
///
public ulong DebugPc
{
diff --git a/src/Ryujinx.HLE/Debugger/Debugger.cs b/src/Ryujinx.HLE/Debugger/Debugger.cs
index d065d4aaa..00986c3b5 100644
--- a/src/Ryujinx.HLE/Debugger/Debugger.cs
+++ b/src/Ryujinx.HLE/Debugger/Debugger.cs
@@ -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(':');
diff --git a/src/Ryujinx.HLE/HOS/Kernel/Process/ProcessExecutionContext.cs b/src/Ryujinx.HLE/HOS/Kernel/Process/ProcessExecutionContext.cs
index 2cfdbd687..7dc117881 100644
--- a/src/Ryujinx.HLE/HOS/Kernel/Process/ProcessExecutionContext.cs
+++ b/src/Ryujinx.HLE/HOS/Kernel/Process/ProcessExecutionContext.cs
@@ -48,6 +48,11 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
{
}
+ public DebugState GetDebugState()
+ {
+ return DebugState.Stopped;
+ }
+
public void StopRunning()
{
Running = false;