From 368ad2451626da0ff9239b775273d092ba13847b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 13 Aug 2022 03:41:55 -0700 Subject: [PATCH] Debugger: Fix multiple conditional watchpoints at the same address --- CHANGES | 1 + src/arm/debugger/memory-debugger.c | 2 +- src/sm83/debugger/memory-debugger.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ab4785fa2..4e82bc981 100644 --- a/CHANGES +++ b/CHANGES @@ -56,6 +56,7 @@ Other fixes: - Core: Fix the runloop resuming after a game has crashed (fixes mgba.io/i/2451) - Core: Fix crash if library can't be opened - Debugger: Fix crash with extremely long CLI strings + - Debugger: Fix multiple conditional watchpoints at the same address - FFmpeg: Fix crash when encoding audio with some containers - FFmpeg: Fix GIF recording (fixes mgba.io/i/2393) - GB: Fix temporary saves diff --git a/src/arm/debugger/memory-debugger.c b/src/arm/debugger/memory-debugger.c index 8ccb592e7..68b4b4175 100644 --- a/src/arm/debugger/memory-debugger.c +++ b/src/arm/debugger/memory-debugger.c @@ -102,7 +102,7 @@ static bool _checkWatchpoints(struct ARMDebugger* debugger, uint32_t address, st int32_t value; int segment; if (!mDebuggerEvaluateParseTree(debugger->d.p, watchpoint->condition, &value, &segment) || !(value || segment >= 0)) { - return false; + continue; } } diff --git a/src/sm83/debugger/memory-debugger.c b/src/sm83/debugger/memory-debugger.c index 2cd81669e..e0a48553f 100644 --- a/src/sm83/debugger/memory-debugger.c +++ b/src/sm83/debugger/memory-debugger.c @@ -52,7 +52,7 @@ static bool _checkWatchpoints(struct SM83Debugger* debugger, uint16_t address, s int32_t value; int segment; if (!mDebuggerEvaluateParseTree(debugger->d.p, watchpoint->condition, &value, &segment) || !(value || segment >= 0)) { - return false; + continue; } } uint8_t oldValue = debugger->originalMemory.load8(debugger->cpu, address);