From fb5a3dcfaac043e99041679e66776af550d1bff1 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Sun, 11 Aug 2019 18:21:16 +0200 Subject: gdbstub: added new GDB stub debugger (#5456) * gdbstub: added new GDB stub debugger This debugger can be used to connect to an external debugger that communicates using the GDB Remote Serial Protocol, such as GDB itself or many other GDB frontends. Currently i386 (ct486), arm7 (gba), and ppc (pmac6100) are supported. * gdbstub: enable GDB stub debugger in mac and windows builds --- src/osd/modules/lib/osdobj_common.cpp | 2 ++ src/osd/modules/lib/osdobj_common.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/osd/modules/lib') diff --git a/src/osd/modules/lib/osdobj_common.cpp b/src/osd/modules/lib/osdobj_common.cpp index d3f5f35192e..4e2d73f6336 100644 --- a/src/osd/modules/lib/osdobj_common.cpp +++ b/src/osd/modules/lib/osdobj_common.cpp @@ -40,6 +40,7 @@ const options_entry osd_options::s_option_entries[] = { nullptr, nullptr, OPTION_HEADER, "OSD DEBUGGING OPTIONS" }, { OSDOPTION_DEBUGGER, OSDOPTVAL_AUTO, OPTION_STRING, "debugger used: " }, + { OSDOPTION_DEBUGGER_PORT, "23946", OPTION_INTEGER, "port to use for gdbstub debugger" }, { OSDOPTION_DEBUGGER_FONT ";dfont", OSDOPTVAL_AUTO, OPTION_STRING, "font to use for debugger views" }, { OSDOPTION_DEBUGGER_FONT_SIZE ";dfontsize", "0", OPTION_FLOAT, "font size to use for debugger views" }, { OSDOPTION_WATCHDOG ";wdog", "0", OPTION_INTEGER, "force the program to terminate if no updates within specified number of seconds" }, @@ -235,6 +236,7 @@ void osd_common_t::register_options() REGISTER_MODULE(m_mod_man, DEBUG_WINDOWS); REGISTER_MODULE(m_mod_man, DEBUG_QT); REGISTER_MODULE(m_mod_man, DEBUG_IMGUI); + REGISTER_MODULE(m_mod_man, DEBUG_GDBSTUB); REGISTER_MODULE(m_mod_man, DEBUG_NONE); #endif diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h index af4d2d332bc..37e043f53ad 100644 --- a/src/osd/modules/lib/osdobj_common.h +++ b/src/osd/modules/lib/osdobj_common.h @@ -37,6 +37,7 @@ #define OSDCOMMAND_LIST_NETWORK_ADAPTERS "listnetwork" #define OSDOPTION_DEBUGGER "debugger" +#define OSDOPTION_DEBUGGER_PORT "debugger_port" #define OSDOPTION_DEBUGGER_FONT "debugger_font" #define OSDOPTION_DEBUGGER_FONT_SIZE "debugger_font_size" #define OSDOPTION_WATCHDOG "watchdog" @@ -106,6 +107,7 @@ public: // debugging options const char *debugger() const { return value(OSDOPTION_DEBUGGER); } + int debugger_port() const { return int_value(OSDOPTION_DEBUGGER_PORT); } const char *debugger_font() const { return value(OSDOPTION_DEBUGGER_FONT); } float debugger_font_size() const { return float_value(OSDOPTION_DEBUGGER_FONT_SIZE); } int watchdog() const { return int_value(OSDOPTION_WATCHDOG); } -- cgit v1.2.3