all repos — mgba @ 1994977c8f8da12691b8df7f3078ab0d3ba980ef

mGBA Game Boy Advance Emulator

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
commit

1994977c8f8da12691b8df7f3078ab0d3ba980ef

parent

d983f31b38b57cd0541d62368ac3296b506f104f

2 files changed, 9 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.cppsrc/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() {