all repos — mgba @ 6f04c89c5fdb86d99a4ffdd90b2d8eda5b7c9fc9

mGBA Game Boy Advance Emulator

DS: Fix non-debugger builds
Vicki Pfau vi@endrift.com
Sat, 08 Apr 2017 11:10:11 -0700
commit

6f04c89c5fdb86d99a4ffdd90b2d8eda5b7c9fc9

parent

18955a53f2d558455c47d5d8b92520eeaf8e30b5

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

jump to
M src/ds/ds.csrc/ds/ds.c

@@ -607,6 +607,7 @@ }

void DSHitStub(struct ARMCore* cpu, uint32_t opcode) { struct DS* ds = (struct DS*) cpu->master; +#ifdef USE_DEBUGGERS if (ds->debugger) { struct mDebuggerEntryInfo info = { .address = _ARMPCAddress(cpu),

@@ -614,6 +615,7 @@ .opcode = opcode

}; mDebuggerEnter(ds->debugger->d.p, DEBUGGER_ENTER_ILLEGAL_OP, &info); } +#endif // TODO: More sensible category? mLOG(DS, ERROR, "Stub opcode: %08x", opcode); }

@@ -629,12 +631,14 @@ } else {

cpu->gprs[ARM_PC] -= WORD_SIZE_ARM * 2; ARM_WRITE_PC; } +#ifdef USE_DEBUGGERS } else if (ds->debugger) { struct mDebuggerEntryInfo info = { .address = _ARMPCAddress(cpu), .opcode = opcode }; mDebuggerEnter(ds->debugger->d.p, DEBUGGER_ENTER_ILLEGAL_OP, &info); +#endif } else { ARMRaiseUndefined(cpu); }

@@ -646,6 +650,7 @@ if (immediate >= CPU_COMPONENT_MAX) {

return; } switch (immediate) { +#ifdef USE_DEBUGGERS case CPU_COMPONENT_DEBUGGER: if (ds->debugger) { struct mDebuggerEntryInfo info = {

@@ -654,6 +659,7 @@ };

mDebuggerEnter(ds->debugger->d.p, DEBUGGER_ENTER_BREAKPOINT, &info); } break; +#endif default: break; }