ARM Debugger: Clear low bit on breakpoint addresses (fixes #1764)
Vicki Pfau vi@endrift.com
Mon, 25 May 2020 00:58:09 -0700
2 files changed,
3 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -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.c
→
src/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