mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 07:49:19 +01:00
GDBStub: Cleanly shut down on stop
This commit is contained in:
parent
b8395280d3
commit
657bb00c01
@ -393,6 +393,15 @@ static void CpuThread(const std::optional<std::string>& savestate_path, bool del
|
|||||||
|
|
||||||
if (_CoreParameter.bFastmem)
|
if (_CoreParameter.bFastmem)
|
||||||
EMM::UninstallExceptionHandler();
|
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,
|
static void FifoPlayerThread(const std::optional<std::string>& savestate_path,
|
||||||
|
@ -689,6 +689,13 @@ void gdb_handle_exception(bool loop_until_continue)
|
|||||||
{
|
{
|
||||||
while (gdb_active())
|
while (gdb_active())
|
||||||
{
|
{
|
||||||
|
if (CPU::GetState() == CPU::State::PowerDown)
|
||||||
|
{
|
||||||
|
gdb_deinit();
|
||||||
|
INFO_LOG_FMT(GDB_STUB, "killed by power down");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gdb_data_available())
|
if (!gdb_data_available())
|
||||||
{
|
{
|
||||||
if (loop_until_continue)
|
if (loop_until_continue)
|
||||||
@ -822,7 +829,7 @@ static void gdb_init_generic(int domain, const sockaddr* server_addr, socklen_t
|
|||||||
INFO_LOG_FMT(GDB_STUB, "Client connected.");
|
INFO_LOG_FMT(GDB_STUB, "Client connected.");
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
closesocket(tmpsock);
|
closesocket(s_tmpsock);
|
||||||
#else
|
#else
|
||||||
close(tmpsock);
|
close(tmpsock);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user