Qt: Pre-attach GDB stub when launching with -g (fixes #1950)
Vicki Pfau vi@endrift.com
Tue, 24 Nov 2020 22:18:15 -0800
1 files changed,
5 insertions(+),
4 deletions(-)
jump to
M
src/platform/qt/Window.cpp
→
src/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) {