all repos — mgba @ ff1033b80150e37e3772f2c08f5e1ac35e25745d

mGBA Game Boy Advance Emulator

ARM Debugger: Clear low bit on breakpoint addresses (fixes #1764)
Vicki Pfau vi@endrift.com
Mon, 25 May 2020 00:58:09 -0700
commit

ff1033b80150e37e3772f2c08f5e1ac35e25745d

parent

ff4406fab00c1e3288ca6e29b6e807802dae57a1

2 files changed, 3 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -26,6 +26,7 @@ - GBA Video: Fix mosaic objects drawing past the end (fixes mgba.io/i/1702)

- GBA Video: Fix disabling OBJWIN in GL renderer (fixes mgba.io/i/1759) Other fixes: - All: Improve export headers (fixes mgba.io/i/1738) + - ARM Debugger: Clear low bit on breakpoint addresses (fixes mgba.io/i/1764) - CMake: Always use devkitPro toolchain when applicable (fixes mgba.io/i/1755) - Core: Ensure ELF regions can be written before trying - Core: Fix ELF loading regression (fixes mgba.io/i/1669)
M src/arm/debugger/debugger.csrc/arm/debugger/debugger.c

@@ -171,7 +171,7 @@ struct ARMDebugBreakpoint* breakpoint = ARMDebugBreakpointListAppend(&debugger->swBreakpoints);

ssize_t id = debugger->nextId; ++debugger->nextId; breakpoint->d.id = id; - breakpoint->d.address = address; + breakpoint->d.address = address & ~1; // Clear Thumb bit since it's not part of a valid address breakpoint->d.segment = -1; breakpoint->d.condition = NULL; breakpoint->d.type = BREAKPOINT_SOFTWARE;

@@ -187,6 +187,7 @@ struct ARMDebugBreakpoint* breakpoint = ARMDebugBreakpointListAppend(&debugger->breakpoints);

ssize_t id = debugger->nextId; ++debugger->nextId; breakpoint->d = *info; + breakpoint->d.address &= ~1; // Clear Thumb bit since it's not part of a valid address breakpoint->d.id = id; if (info->type == BREAKPOINT_SOFTWARE) { // TODO