all repos — mgba @ 2420fd81e71c3db111fa44cfc075b1c921948b24

mGBA Game Boy Advance Emulator

Qt: Fix race conditions initializing GDB stub
Vicki Pfau vi@endrift.com
Thu, 27 Jun 2019 17:56:09 -0700
commit

2420fd81e71c3db111fa44cfc075b1c921948b24

parent

4731bae9e00a39c0ba2090846f16296704442514

M CHANGESCHANGES

@@ -42,6 +42,7 @@ - Core: Fix crash when exiting game with cheats loaded

- GBA Cheats: Fix PARv3 Thumb hooks - mGUI: Fix crash if last loaded ROM directory disappears (fixes mgba.io/i/1466) - Libretro: Fix crash changing allowing opposing directions (hhromic) + - Qt: Fix race conditions initializing GDB stub Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
M src/platform/qt/CoreController.cppsrc/platform/qt/CoreController.cpp

@@ -275,6 +275,7 @@ void CoreController::setDebugger(mDebugger* debugger) {

Interrupter interrupter(this); if (debugger) { mDebuggerAttach(debugger, m_threadContext.core); + mDebuggerEnter(debugger, DEBUGGER_ENTER_ATTACHED, 0); } else { m_threadContext.core->detachDebugger(m_threadContext.core); }
M src/platform/qt/DebuggerController.cppsrc/platform/qt/DebuggerController.cpp

@@ -46,7 +46,6 @@ }

if (m_gameController) { attachInternal(); m_gameController->setDebugger(m_debugger); - mDebuggerEnter(m_debugger, DEBUGGER_ENTER_ATTACHED, 0); } else { m_autoattach = true; }
M src/platform/qt/GDBController.cppsrc/platform/qt/GDBController.cpp

@@ -34,10 +34,10 @@ m_bindAddress.ipv4 = htonl(bindAddress);

} void GDBController::listen() { - if (!isAttached()) { - attach(); - } if (GDBStubListen(&m_gdbStub, m_port, &m_bindAddress)) { + if (!isAttached()) { + attach(); + } emit listening(); } else { detach();