GDBStub: Cleanly shut down on stop

This commit is contained in:
aldelaro5
2021-10-01 01:57:40 -04:00
parent b8395280d3
commit 657bb00c01
2 changed files with 17 additions and 1 deletions

View File

@ -393,6 +393,15 @@ static void CpuThread(const std::optional<std::string>& savestate_path, bool del
if (_CoreParameter.bFastmem)
EMM::UninstallExceptionHandler();
#ifdef USE_GDBSTUB
if (gdb_active())
{
gdb_deinit();
INFO_LOG_FMT(GDB_STUB, "Killed by CPU shutdown");
return;
}
#endif
}
static void FifoPlayerThread(const std::optional<std::string>& savestate_path,