ARM: Fix non-debugger build
Vicki Pfau vi@endrift.com
Wed, 25 Nov 2020 20:40:20 -0800
2 files changed,
7 insertions(+),
2 deletions(-)
M
include/mgba/internal/arm/decoder.h
→
include/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.c
→
src/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;