all repos — mgba @ 87d87b200fc3c792faf8bc1af8ffe640b60e1029

mGBA Game Boy Advance Emulator

Qt: Pre-attach GDB stub when launching with -g (fixes #1950)
Vicki Pfau vi@endrift.com
Tue, 24 Nov 2020 22:18:15 -0800
commit

87d87b200fc3c792faf8bc1af8ffe640b60e1029

parent

42879afb9cb9f31c27c02e9c0d42836bcaf26121

1 files changed, 5 insertions(+), 4 deletions(-)

jump to
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -181,10 +181,6 @@ if (args->savestate) {

m_pendingState = args->savestate; } - if (args->fname) { - setController(m_manager->loadGame(args->fname), args->fname); - } - #ifdef USE_GDB_STUB if (args->debuggerType == DEBUGGER_GDB) { if (!m_gdbController) {

@@ -192,10 +188,15 @@ m_gdbController = new GDBController(this);

if (m_controller) { m_gdbController->setController(m_controller); } + m_gdbController->attach(); m_gdbController->listen(); } } #endif + + if (args->fname) { + setController(m_manager->loadGame(args->fname), args->fname); + } } void Window::resizeFrame(const QSize& size) {