diff --git a/nemu/src/monitor/sdb/sdb.c b/nemu/src/monitor/sdb/sdb.c index 6fd3055..f9758fe 100644 --- a/nemu/src/monitor/sdb/sdb.c +++ b/nemu/src/monitor/sdb/sdb.c @@ -189,6 +189,7 @@ static int cmd_x(char *args) { word_t addr = parse_expr(arg, &res); if (!res) goto wrong_usage; + addr = addr & ~0x3; for (paddr_t paddr = addr; paddr < addr + n; paddr += WORD_BYTES) { word_t value = paddr_read(addr, WORD_BYTES);