GDB Server: fix and cleanup

Move source files to Emu/GDB.cpp, GDB.h
Remove "WITH_GDB" option, enable GDB Server by default.
Change class name to gdb_thread.
Alias for external access gdb_server.
Change config option name to "GDB Server"
Bind on 127.0.0.1 by default.
This commit is contained in:
Nekotekina 2019-10-08 03:19:59 +03:00
parent 9d4de51cb6
commit a29d4150df
10 changed files with 192 additions and 208 deletions

View file

@ -38,8 +38,6 @@
#include <memory>
#include <regex>
#include "Utilities/GDBDebugServer.h"
#include "Utilities/JIT.h"
#if defined(_WIN32) || defined(HAVE_VULKAN)
@ -421,10 +419,6 @@ void Emulator::Init()
make_path_verbose(fs::get_cache_dir() + "shaderlog/");
make_path_verbose(fs::get_config_dir() + "captures/");
#ifdef WITH_GDB_DEBUGGER
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
g_fxo->init<patch_engine>()->append(fs::get_config_dir() + "/patch.yml");
@ -1661,11 +1655,6 @@ void Emulator::Run()
idm::select<named_thread<ppu_thread>>(on_select);
idm::select<named_thread<spu_thread>>(on_select);
#ifdef WITH_GDB_DEBUGGER
// Initialize debug server at the end of emu run sequence
fxm::make<GDBDebugServer>();
#endif
}
bool Emulator::Pause()