all repos — mgba @ b169e6b0dfa177ca6390d7f9e025e7412a22afe8

mGBA Game Boy Advance Emulator

ARM: Fix non-debugger build
Vicki Pfau vi@endrift.com
Wed, 25 Nov 2020 20:40:20 -0800
commit

b169e6b0dfa177ca6390d7f9e025e7412a22afe8

parent

1baa6fefbb49bea6c72cdffeda1f5f3ce50a1779

2 files changed, 7 insertions(+), 2 deletions(-)

jump to
M include/mgba/internal/arm/decoder.hinclude/mgba/internal/arm/decoder.h

@@ -215,13 +215,16 @@ unsigned sDataCycles : 10;

unsigned nDataCycles : 10; }; -struct mDebuggerSymbols; void ARMDecodeARM(uint32_t opcode, struct ARMInstructionInfo* info); void ARMDecodeThumb(uint16_t opcode, struct ARMInstructionInfo* info); bool ARMDecodeThumbCombine(struct ARMInstructionInfo* info1, struct ARMInstructionInfo* info2, struct ARMInstructionInfo* out); +uint32_t ARMResolveMemoryAccess(struct ARMInstructionInfo* info, struct ARMRegisterFile* regs, uint32_t pc); + +#ifdef USE_DEBUGGERS +struct mDebuggerSymbols; int ARMDisassemble(struct ARMInstructionInfo* info, struct ARMCore* core, const struct mDebuggerSymbols* symbols, uint32_t pc, char* buffer, int blen); -uint32_t ARMResolveMemoryAccess(struct ARMInstructionInfo* info, struct ARMRegisterFile* regs, uint32_t pc); +#endif CXX_GUARD_END
M src/arm/decoder.csrc/arm/decoder.c

@@ -9,6 +9,7 @@ #include <mgba/internal/arm/decoder-inlines.h>

#include <mgba/internal/debugger/symbols.h> #include <mgba-util/string.h> +#ifdef USE_DEBUGGERS #define ADVANCE(AMOUNT) \ if (AMOUNT >= blen) { \ buffer[blen - 1] = '\0'; \

@@ -543,6 +544,7 @@ }

buffer[blen - 1] = '\0'; return total; } +#endif uint32_t ARMResolveMemoryAccess(struct ARMInstructionInfo* info, struct ARMRegisterFile* regs, uint32_t pc) { uint32_t address = 0;