LR35902: Fix disassembling segments
Vicki Pfau vi@endrift.com
Mon, 22 May 2017 22:19:01 -0700
1 files changed,
3 insertions(+),
1 deletions(-)
M
src/lr35902/debugger/cli-debugger.c
→
src/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); } }