all repos — mgba @ 7de5b33554a9c0b41c963d220dd85ceda1bf3022

mGBA Game Boy Advance Emulator

LR35902: Fix disassembling segments
Vicki Pfau vi@endrift.com
Mon, 22 May 2017 22:19:01 -0700
commit

7de5b33554a9c0b41c963d220dd85ceda1bf3022

parent

c4175846d88345d203153b64e8eb57559b9301ab

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

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

@@ -31,11 +31,13 @@ static void _disassemble(struct CLIDebuggerSystem* debugger, struct CLIDebugVector* dv) {

struct LR35902Core* cpu = debugger->p->d.core->cpu; uint16_t address; + int segment = -1; size_t size; if (!dv || dv->type != CLIDV_INT_TYPE) { address = cpu->pc; } else { address = dv->intValue; + segment = dv->segmentValue; dv = dv->next; }

@@ -48,7 +50,7 @@ }

size_t i; for (i = 0; i < size; ++i) { - address = _printLine(debugger->p, address, dv->segmentValue); + address = _printLine(debugger->p, address, segment); } }