ARM: Fix non-debugger build

This commit is contained in:
Vicki Pfau 2020-11-25 20:40:20 -08:00
parent 1baa6fefbb
commit b169e6b0df
2 changed files with 7 additions and 2 deletions

View File

@ -215,14 +215,17 @@ struct ARMInstructionInfo {
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);
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);
#ifdef USE_DEBUGGERS
struct mDebuggerSymbols;
int ARMDisassemble(struct ARMInstructionInfo* info, struct ARMCore* core, const struct mDebuggerSymbols* symbols, uint32_t pc, char* buffer, int blen);
#endif
CXX_GUARD_END
#endif

View File

@ -9,6 +9,7 @@
#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 @@ int ARMDisassemble(struct ARMInstructionInfo* info, struct ARMCore* cpu, const s
buffer[blen - 1] = '\0';
return total;
}
#endif
uint32_t ARMResolveMemoryAccess(struct ARMInstructionInfo* info, struct ARMRegisterFile* regs, uint32_t pc) {
uint32_t address = 0;