all repos — mgba @ 98dc092f9abcff2e0800804a50849e11bcf92b0c

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

98dc092f9abcff2e0800804a50849e11bcf92b0c

parent

29c7dc67973674244f29cbeefacc08fe604edbc6

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

jump to
M CHANGESCHANGES

@@ -12,6 +12,7 @@ - GBA Timers: Fix deserializing count-up timers

- 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: + - 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: Fix ELF loading regression (fixes mgba.io/i/1669) - Core: Fix crash modifying hash table entry (fixes mgba.io/i/1673)
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