Qt: Fix crash starting a GDB stub if a game isn't loaded
Jeffrey Pfau jeffrey@endrift.com
Fri, 20 Feb 2015 00:23:03 -0800
2 files changed,
9 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -39,6 +39,7 @@ - GBA BIOS: Prevent CpuSet and CpuFastSet from using BIOS addresses as a source (fixes #184)
- GBA RR: Fix fallthrough error when reading tags from a movie - GBA Thread: Fix possible deadlock in video sync - GBA: Fix savestate loading of DISPSTAT and WAITCNT registers + - Qt: Fix crash starting a GDB stub if a game isn't loaded Misc: - GBA Audio: Change internal audio sample buffer from 32-bit to 16-bit samples - GBA Memory: Simplify memory API and use fixed bus width
M
src/platform/qt/GDBController.cpp
→
src/platform/qt/GDBController.cpp
@@ -40,7 +40,14 @@ if (isAttached()) {
return; } m_gameController->setDebugger(&m_gdbStub.d); - ARMDebuggerEnter(&m_gdbStub.d, DEBUGGER_ENTER_ATTACHED, 0); + if (m_gameController->isLoaded()) { + ARMDebuggerEnter(&m_gdbStub.d, DEBUGGER_ENTER_ATTACHED, 0); + } else { + connect(m_gameController, &GameController::gameStarted, [this] () { + disconnect(m_gameController); + ARMDebuggerEnter(&m_gdbStub.d, DEBUGGER_ENTER_ATTACHED, 0); + }); + } } void GDBController::detach() {