diff --git a/CHANGES b/CHANGES index c2eb314c8..09405880c 100644 --- a/CHANGES +++ b/CHANGES @@ -56,6 +56,7 @@ Misc: - VFS: VFile.sync now updates modified time - GBA: Add overrides for DBZ: Legacy of Goku II and Ueki no Housoku - Util: Fix intermittent build failure on OS X + - Qt: Make -g flag work in Qt build 0.4.0: (2016-02-02) Features: diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 index 4ab76aafc..6662ec0c7 100644 --- a/doc/mgba-qt.6 +++ b/doc/mgba-qt.6 @@ -11,7 +11,7 @@ .Nd Game Boy Advance emulator .Sh SYNOPSIS .Nm mgba-qt -.Op Fl 123456f +.Op Fl 123456fg .Op Fl b Ar biosfile .Op Fl l Ar loglevel .Op Fl p Ar patchfile @@ -42,6 +42,11 @@ will use the BIOS specified in the configuration file, or a high\(hylevel emulated BIOS if none is specified. .It Fl f Start the emulator full\(hyscreen. +.It Fl g +Start a +.Xr gdb 1 +session. +By default the session starts on port 2345. .It Fl l Ar loglevel Log messages during emulation. .Ar loglevel diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 88c7ee654..3f987853e 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -182,6 +182,15 @@ void Window::argumentsPassed(mArguments* args) { if (args->fname) { m_controller->loadGame(args->fname); } + +#ifdef USE_GDB_STUB + if (args->debuggerType == DEBUGGER_GDB) { + if (!m_gdbController) { + m_gdbController = new GDBController(m_controller, this); + m_gdbController->listen(); + } + } +#endif } void Window::resizeFrame(const QSize& size) {