mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix race conditions initializing GDB stub
This commit is contained in:
parent
4731bae9e0
commit
2420fd81e7
1
CHANGES
1
CHANGES
|
@ -42,6 +42,7 @@ Other fixes:
|
|||
- 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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ void DebuggerController::attach() {
|
|||
if (m_gameController) {
|
||||
attachInternal();
|
||||
m_gameController->setDebugger(m_debugger);
|
||||
mDebuggerEnter(m_debugger, DEBUGGER_ENTER_ATTACHED, 0);
|
||||
} else {
|
||||
m_autoattach = true;
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ void GDBController::setBindAddress(uint32_t bindAddress) {
|
|||
}
|
||||
|
||||
void GDBController::listen() {
|
||||
if (!isAttached()) {
|
||||
attach();
|
||||
}
|
||||
if (GDBStubListen(&m_gdbStub, m_port, &m_bindAddress)) {
|
||||
if (!isAttached()) {
|
||||
attach();
|
||||
}
|
||||
emit listening();
|
||||
} else {
|
||||
detach();
|
||||
|
|
Loading…
Reference in New Issue