all repos — mgba @ 2b2a61baa1a1a265ee6997a93b3d7d96b83cd690

mGBA Game Boy Advance Emulator

LR35902: Fix watchpoints not reporting new value
Vicki Pfau vi@endrift.com
Tue, 26 Dec 2017 16:32:16 -0500
commit

2b2a61baa1a1a265ee6997a93b3d7d96b83cd690

parent

500d613452d74d04e9df52201dfd610da35268d2

2 files changed, 5 insertions(+), 4 deletions(-)

jump to
M CHANGESCHANGES

@@ -31,6 +31,7 @@ - GBA Video: Add delay when enabling BGs (fixes mgba.io/i/744, mgba.io/i/752)

- GB Memory: HDMAs should not start when LCD is off (fixes mgba.io/i/310) - GBA Cheats: Fix slide codes not initializing properly - Qt: Fix locale being set to English on settings save (fixes mgba.io/i/906) + - LR35902: Fix watchpoints not reporting new value Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
M src/lr35902/debugger/memory-debugger.csrc/lr35902/debugger/memory-debugger.c

@@ -27,19 +27,19 @@ abort(); \

debuggerFound: break; \ } while(0) -#define CREATE_WATCHPOINT_SHIM(NAME, RW, RETURN, TYPES, ...) \ +#define CREATE_WATCHPOINT_SHIM(NAME, RW, VALUE, RETURN, TYPES, ...) \ static RETURN DebuggerShim_ ## NAME TYPES { \ struct LR35902Debugger* debugger; \ FIND_DEBUGGER(debugger, cpu); \ struct mDebuggerEntryInfo info; \ - if (_checkWatchpoints(debugger, address, &info, WATCHPOINT_ ## RW, 0)) { \ + if (_checkWatchpoints(debugger, address, &info, WATCHPOINT_ ## RW, VALUE)) { \ mDebuggerEnter(debugger->d.p, DEBUGGER_ENTER_WATCHPOINT, &info); \ } \ return debugger->originalMemory.NAME(cpu, __VA_ARGS__); \ } -CREATE_WATCHPOINT_SHIM(load8, READ, uint8_t, (struct LR35902Core* cpu, uint16_t address), address) -CREATE_WATCHPOINT_SHIM(store8, WRITE, void, (struct LR35902Core* cpu, uint16_t address, int8_t value), address, value) +CREATE_WATCHPOINT_SHIM(load8, READ, 0, uint8_t, (struct LR35902Core* cpu, uint16_t address), address) +CREATE_WATCHPOINT_SHIM(store8, WRITE, value, void, (struct LR35902Core* cpu, uint16_t address, int8_t value), address, value) static bool _checkWatchpoints(struct LR35902Debugger* debugger, uint16_t address, struct mDebuggerEntryInfo* info, enum mWatchpointType type, uint8_t newValue) { struct LR35902DebugWatchpoint* watchpoint;