gdb: Interrupt at currently selected thread

This commit is contained in:
Coxxs 2025-06-24 15:40:10 +08:00
parent 1b37038d5a
commit b932905053

View file

@ -222,7 +222,7 @@ namespace Ryujinx.HLE.Debugger
{
case BreakInMessage:
Logger.Notice.Print(LogClass.GdbStub, "Break-in requested");
CommandQuery();
CommandInterrupt();
break;
case SendNackMessage:
@ -731,6 +731,18 @@ namespace Ryujinx.HLE.Debugger
Reply($"T05thread:{cThread:x};");
}
void CommandInterrupt()
{
// GDB is requesting an interrupt. Stop everything.
DebugProcess.DebugStop();
if (gThread == null || !GetThreads().Any(x => x.ThreadUid == gThread.Value))
{
gThread = cThread = DebugProcess.GetThreadUids().First();
}
Reply($"T02thread:{gThread:x};");
}
void CommandContinue(ulong? newPc)
{
if (newPc.HasValue)