all repos — mgba @ b5b559498bb27403b2124b050c7a87c9ae028eeb

mGBA Game Boy Advance Emulator

LR35902: Fix disassembling multiple lines
Jeffrey Pfau jeffrey@endrift.com
Thu, 05 Jan 2017 00:10:15 -0800
commit

b5b559498bb27403b2124b050c7a87c9ae028eeb

parent

7fe7749797aab4d0b18948cd38315e0c518c6e3e

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M src/lr35902/debugger/cli-debugger.csrc/lr35902/debugger/cli-debugger.c

@@ -13,7 +13,7 @@

static void _printStatus(struct CLIDebuggerSystem*); static void _disassemble(struct CLIDebuggerSystem* debugger, struct CLIDebugVector* dv); -static uint32_t _printLine(struct CLIDebugger* debugger, uint16_t address, int segment); +static uint16_t _printLine(struct CLIDebugger* debugger, uint16_t address, int segment); static struct CLIDebuggerCommandSummary _lr35902Commands[] = { { 0, 0, 0, 0 }

@@ -48,11 +48,11 @@ }

size_t i; for (i = 0; i < size; ++i) { - address += _printLine(debugger->p, address, -1); + address = _printLine(debugger->p, address, -1); } } -static inline uint32_t _printLine(struct CLIDebugger* debugger, uint16_t address, int segment) { +static inline uint16_t _printLine(struct CLIDebugger* debugger, uint16_t address, int segment) { struct CLIDebuggerBackend* be = debugger->backend; struct LR35902InstructionInfo info = {}; char disassembly[48];