diff --git a/src/gba/gba.c b/src/gba/gba.c index a6b29c2e5..c0b8223ae 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -346,6 +346,11 @@ void GBAAttachDebugger(struct GBA* gba, struct ARMDebugger* debugger) { gba->debugger = debugger; } +void GBADetachDebugger(struct GBA* gba) { + ARMDebuggerDeinit(gba->debugger); + gba->debugger = 0; +} + void GBALoadROM(struct GBA* gba, int fd, const char* fname) { struct stat info; gba->memory.rom = fileMemoryMap(fd, SIZE_CART0, MEMORY_READ); diff --git a/src/gba/gba.h b/src/gba/gba.h index 018f50bd1..8b55ccd5d 100644 --- a/src/gba/gba.h +++ b/src/gba/gba.h @@ -141,6 +141,7 @@ int GBAWaitForIRQ(struct GBA* gba); int GBAHalt(struct GBA* gba); void GBAAttachDebugger(struct GBA* gba, struct ARMDebugger* debugger); +void GBADetachDebugger(struct GBA* gba); void GBALoadROM(struct GBA* gba, int fd, const char* fname); void GBALoadBIOS(struct GBA* gba, int fd);