Qt: Pre-attach GDB stub when launching with -g (fixes #1950)

This commit is contained in:
Vicki Pfau 2020-11-24 22:18:15 -08:00
parent 42879afb9c
commit 87d87b200f
1 changed files with 5 additions and 4 deletions

View File

@ -181,10 +181,6 @@ void Window::argumentsPassed(mArguments* args) {
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 @@ void Window::argumentsPassed(mArguments* args) {
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) {