Debugger: Close trace log when done tracing

This commit is contained in:
Vicki Pfau 2020-11-09 00:08:36 -08:00
parent e7028e4b29
commit 4b4d5b59e5
2 changed files with 7 additions and 1 deletions

View File

@ -48,6 +48,7 @@ Other fixes:
- CMake: Fix build with downstream minizip that exports incompatible symbols
- Core: Ensure ELF regions can be written before trying
- Debugger: Don't skip undefined instructions when debugger attached
- Debugger: Close trace log when done tracing
- FFmpeg: Fix some small memory leaks
- FFmpeg: Fix encoding of time base
- Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642)

View File

@ -752,7 +752,12 @@ static bool _doTrace(struct CLIDebugger* debugger) {
if (debugger->traceRemaining > 0) {
--debugger->traceRemaining;
}
return debugger->traceRemaining != 0;
if (!debugger->traceRemaining) {
debugger->traceVf->close(debugger->traceVf);
debugger->traceVf = NULL;
return false;
}
return true;
}
static void _printStatus(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {