Skip to content

Commit c979c35

Browse files
authored
Merge pull request #50 from RinHizakura/gdbstub
Fix gdbstub read memory error
2 parents 859b1ef + 5a32c6e commit c979c35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gdbstub.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static void rv_read_mem(void *args, size_t addr, size_t len, void *val)
2323
struct riscv_t *rv = (struct riscv_t *) args;
2424

2525
for (size_t i = 0; i < len; i++)
26-
*((uint8_t *) val + i) = rv->io.mem_read_b(rv, addr);
26+
*((uint8_t *) val + i) = rv->io.mem_read_b(rv, addr + i);
2727
}
2828

2929
static gdb_action_t rv_cont(void *args)

0 commit comments

Comments
 (0)