mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
Delay GDB server launch until emulator run (#4658)
This commit is contained in:
parent
7b5dcd9d6a
commit
fb20c27e7b
3 changed files with 10 additions and 3 deletions
|
@ -338,6 +338,7 @@ bool GDBDebugServer::select_thread(u64 id)
|
||||||
selected_thread = ppu.ptr;
|
selected_thread = ppu.ptr;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
gdbDebugServer.warning("Unable to select thread! Is the emulator running?");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,8 @@ class GDBDebugServer : public named_thread {
|
||||||
void try_read_cmd(gdb_cmd& out_cmd);
|
void try_read_cmd(gdb_cmd& out_cmd);
|
||||||
//reads commands until receiveing one with valid checksum
|
//reads commands until receiveing one with valid checksum
|
||||||
//in case of other exception (i.e. wrong first char of command)
|
//in case of other exception (i.e. wrong first char of command)
|
||||||
//it will log exception text and return false
|
//it will log exception text and return false
|
||||||
//in that case best for caller would be to stop reading, because
|
//in that case best for caller would be to stop reading, because
|
||||||
//chance of getting correct command is low
|
//chance of getting correct command is low
|
||||||
bool read_cmd(gdb_cmd& out_cmd);
|
bool read_cmd(gdb_cmd& out_cmd);
|
||||||
//send cnt bytes from buf to client
|
//send cnt bytes from buf to client
|
||||||
|
|
|
@ -263,8 +263,9 @@ void Emulator::Init()
|
||||||
fs::create_path(dev_usb);
|
fs::create_path(dev_usb);
|
||||||
|
|
||||||
#ifdef WITH_GDB_DEBUGGER
|
#ifdef WITH_GDB_DEBUGGER
|
||||||
fxm::make<GDBDebugServer>();
|
LOG_SUCCESS(GENERAL, "GDB debug server will be started and listening on %d upon emulator boot", (int) g_cfg.misc.gdb_server_port);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Initialize patch engine
|
// Initialize patch engine
|
||||||
fxm::make_always<patch_engine>()->append(fs::get_config_dir() + "/patch.yml");
|
fxm::make_always<patch_engine>()->append(fs::get_config_dir() + "/patch.yml");
|
||||||
|
|
||||||
|
@ -1136,6 +1137,11 @@ void Emulator::Run()
|
||||||
idm::select<ppu_thread>(on_select);
|
idm::select<ppu_thread>(on_select);
|
||||||
idm::select<RawSPUThread>(on_select);
|
idm::select<RawSPUThread>(on_select);
|
||||||
idm::select<SPUThread>(on_select);
|
idm::select<SPUThread>(on_select);
|
||||||
|
|
||||||
|
#ifdef WITH_GDB_DEBUGGER
|
||||||
|
// Initialize debug server at the end of emu run sequence
|
||||||
|
fxm::make<GDBDebugServer>();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Emulator::Pause()
|
bool Emulator::Pause()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue