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
|
- GBA Cheats: Fix PARv3 Thumb hooks
|
||||||
- mGUI: Fix crash if last loaded ROM directory disappears (fixes mgba.io/i/1466)
|
- mGUI: Fix crash if last loaded ROM directory disappears (fixes mgba.io/i/1466)
|
||||||
- Libretro: Fix crash changing allowing opposing directions (hhromic)
|
- Libretro: Fix crash changing allowing opposing directions (hhromic)
|
||||||
|
- Qt: Fix race conditions initializing GDB stub
|
||||||
Misc:
|
Misc:
|
||||||
- GBA Savedata: EEPROM performance fixes
|
- GBA Savedata: EEPROM performance fixes
|
||||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||||
|
|
|
@ -275,6 +275,7 @@ void CoreController::setDebugger(mDebugger* debugger) {
|
||||||
Interrupter interrupter(this);
|
Interrupter interrupter(this);
|
||||||
if (debugger) {
|
if (debugger) {
|
||||||
mDebuggerAttach(debugger, m_threadContext.core);
|
mDebuggerAttach(debugger, m_threadContext.core);
|
||||||
|
mDebuggerEnter(debugger, DEBUGGER_ENTER_ATTACHED, 0);
|
||||||
} else {
|
} else {
|
||||||
m_threadContext.core->detachDebugger(m_threadContext.core);
|
m_threadContext.core->detachDebugger(m_threadContext.core);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,6 @@ void DebuggerController::attach() {
|
||||||
if (m_gameController) {
|
if (m_gameController) {
|
||||||
attachInternal();
|
attachInternal();
|
||||||
m_gameController->setDebugger(m_debugger);
|
m_gameController->setDebugger(m_debugger);
|
||||||
mDebuggerEnter(m_debugger, DEBUGGER_ENTER_ATTACHED, 0);
|
|
||||||
} else {
|
} else {
|
||||||
m_autoattach = true;
|
m_autoattach = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,10 +34,10 @@ void GDBController::setBindAddress(uint32_t bindAddress) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GDBController::listen() {
|
void GDBController::listen() {
|
||||||
if (!isAttached()) {
|
|
||||||
attach();
|
|
||||||
}
|
|
||||||
if (GDBStubListen(&m_gdbStub, m_port, &m_bindAddress)) {
|
if (GDBStubListen(&m_gdbStub, m_port, &m_bindAddress)) {
|
||||||
|
if (!isAttached()) {
|
||||||
|
attach();
|
||||||
|
}
|
||||||
emit listening();
|
emit listening();
|
||||||
} else {
|
} else {
|
||||||
detach();
|
detach();
|
||||||
|
|
Loading…
Reference in New Issue