mirror of https://github.com/mgba-emu/mgba.git
LR35902: Fix watchpoints not reporting new value
This commit is contained in:
parent
6c1f03f4a2
commit
b25ac9147d
1
CHANGES
1
CHANGES
|
@ -9,6 +9,7 @@ Bugfixes:
|
||||||
- GB Memory: HDMAs should not start when LCD is off (fixes mgba.io/i/310)
|
- GB Memory: HDMAs should not start when LCD is off (fixes mgba.io/i/310)
|
||||||
- GBA Cheats: Fix slide codes not initializing properly
|
- GBA Cheats: Fix slide codes not initializing properly
|
||||||
- Qt: Fix locale being set to English on settings save (fixes mgba.io/i/906)
|
- Qt: Fix locale being set to English on settings save (fixes mgba.io/i/906)
|
||||||
|
- LR35902: Fix watchpoints not reporting new value
|
||||||
Misc:
|
Misc:
|
||||||
- GBA: Improve multiboot image detection
|
- GBA: Improve multiboot image detection
|
||||||
- GB MBC: Remove erroneous bank 0 wrapping
|
- GB MBC: Remove erroneous bank 0 wrapping
|
||||||
|
|
|
@ -27,19 +27,19 @@ static bool _checkWatchpoints(struct LR35902Debugger* debugger, uint16_t address
|
||||||
debuggerFound: break; \
|
debuggerFound: break; \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define CREATE_WATCHPOINT_SHIM(NAME, RW, RETURN, TYPES, ...) \
|
#define CREATE_WATCHPOINT_SHIM(NAME, RW, VALUE, RETURN, TYPES, ...) \
|
||||||
static RETURN DebuggerShim_ ## NAME TYPES { \
|
static RETURN DebuggerShim_ ## NAME TYPES { \
|
||||||
struct LR35902Debugger* debugger; \
|
struct LR35902Debugger* debugger; \
|
||||||
FIND_DEBUGGER(debugger, cpu); \
|
FIND_DEBUGGER(debugger, cpu); \
|
||||||
struct mDebuggerEntryInfo info; \
|
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); \
|
mDebuggerEnter(debugger->d.p, DEBUGGER_ENTER_WATCHPOINT, &info); \
|
||||||
} \
|
} \
|
||||||
return debugger->originalMemory.NAME(cpu, __VA_ARGS__); \
|
return debugger->originalMemory.NAME(cpu, __VA_ARGS__); \
|
||||||
}
|
}
|
||||||
|
|
||||||
CREATE_WATCHPOINT_SHIM(load8, READ, uint8_t, (struct LR35902Core* cpu, uint16_t address), address)
|
CREATE_WATCHPOINT_SHIM(load8, READ, 0, 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(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) {
|
static bool _checkWatchpoints(struct LR35902Debugger* debugger, uint16_t address, struct mDebuggerEntryInfo* info, enum mWatchpointType type, uint8_t newValue) {
|
||||||
struct LR35902DebugWatchpoint* watchpoint;
|
struct LR35902DebugWatchpoint* watchpoint;
|
||||||
|
|
Loading…
Reference in New Issue