all repos — mgba @ 37a0839a251b432d2d0bb1ebe70d4aa100008c1d

mGBA Game Boy Advance Emulator

Debugger: Some memory debugger fixes
Jeffrey Pfau jeffrey@endrift.com
Fri, 29 Apr 2016 00:17:43 -0700
commit

37a0839a251b432d2d0bb1ebe70d4aa100008c1d

parent

5c9d5d9ddf92ece61614d3c0c5e1b92c14b604bd

1 files changed, 6 insertions(+), 4 deletions(-)

jump to
M src/arm/memory-debugger.csrc/arm/memory-debugger.c

@@ -14,16 +14,18 @@

static bool _checkWatchpoints(struct ARMDebugger* debugger, uint32_t address, struct mDebuggerEntryInfo* info, enum mWatchpointType type, uint32_t newValue, int width); #define FIND_DEBUGGER(DEBUGGER, CPU) \ - { \ + do { \ DEBUGGER = 0; \ size_t i; \ for (i = 0; i < CPU->numComponents; ++i) { \ if (CPU->components[i]->id == DEBUGGER_ID) { \ - DEBUGGER = (struct ARMDebugger*) cpu->components[i]; \ - break; \ + DEBUGGER = (struct ARMDebugger*) ((struct mDebugger*) cpu->components[i])->platform; \ + goto debuggerFound; \ } \ } \ - } + abort(); \ + debuggerFound: break; \ + } while(0) #define CREATE_SHIM(NAME, RETURN, TYPES, ...) \ static RETURN DebuggerShim_ ## NAME TYPES { \