diff --git a/Utilities/GDBDebugServer.cpp b/Utilities/GDBDebugServer.cpp index c0bcf02e03..373aef10bb 100644 --- a/Utilities/GDBDebugServer.cpp +++ b/Utilities/GDBDebugServer.cpp @@ -338,6 +338,7 @@ bool GDBDebugServer::select_thread(u64 id) selected_thread = ppu.ptr; return true; } + gdbDebugServer.warning("Unable to select thread! Is the emulator running?"); return false; } diff --git a/Utilities/GDBDebugServer.h b/Utilities/GDBDebugServer.h index ce74f508df..c36935eb26 100644 --- a/Utilities/GDBDebugServer.h +++ b/Utilities/GDBDebugServer.h @@ -60,8 +60,8 @@ class GDBDebugServer : public named_thread { void try_read_cmd(gdb_cmd& out_cmd); //reads commands until receiveing one with valid checksum //in case of other exception (i.e. wrong first char of command) - //it will log exception text and return false - //in that case best for caller would be to stop reading, because + //it will log exception text and return false + //in that case best for caller would be to stop reading, because //chance of getting correct command is low bool read_cmd(gdb_cmd& out_cmd); //send cnt bytes from buf to client diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index d609fc3b50..fbc3b02d30 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -263,8 +263,9 @@ void Emulator::Init() fs::create_path(dev_usb); #ifdef WITH_GDB_DEBUGGER - fxm::make(); + LOG_SUCCESS(GENERAL, "GDB debug server will be started and listening on %d upon emulator boot", (int) g_cfg.misc.gdb_server_port); #endif + // Initialize patch engine fxm::make_always()->append(fs::get_config_dir() + "/patch.yml"); @@ -1136,6 +1137,11 @@ void Emulator::Run() idm::select(on_select); idm::select(on_select); idm::select(on_select); + +#ifdef WITH_GDB_DEBUGGER + // Initialize debug server at the end of emu run sequence + fxm::make(); +#endif } bool Emulator::Pause()