mirror of https://github.com/mgba-emu/mgba.git
Core: Reattaching the same debugger is a no-op
This commit is contained in:
parent
196f507d3b
commit
a7d63cde54
|
@ -1061,6 +1061,9 @@ static struct CLIDebuggerSystem* _GBCoreCliDebuggerSystem(struct mCore* core) {
|
|||
|
||||
static void _GBCoreAttachDebugger(struct mCore* core, struct mDebugger* debugger) {
|
||||
struct SM83Core* cpu = core->cpu;
|
||||
if (core->debugger == debugger) {
|
||||
return;
|
||||
}
|
||||
if (core->debugger) {
|
||||
SM83HotplugDetach(cpu, CPU_COMPONENT_DEBUGGER);
|
||||
}
|
||||
|
|
|
@ -1129,6 +1129,9 @@ static struct CLIDebuggerSystem* _GBACoreCliDebuggerSystem(struct mCore* core) {
|
|||
}
|
||||
|
||||
static void _GBACoreAttachDebugger(struct mCore* core, struct mDebugger* debugger) {
|
||||
if (core->debugger == debugger) {
|
||||
return;
|
||||
}
|
||||
if (core->debugger) {
|
||||
GBADetachDebugger(core->board);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue