diff --git a/nemu/src/monitor/sdb/addrexp.y b/nemu/src/monitor/sdb/addrexp.y index f60ddd2..387e41d 100644 --- a/nemu/src/monitor/sdb/addrexp.y +++ b/nemu/src/monitor/sdb/addrexp.y @@ -42,7 +42,7 @@ expression $$ = $1 / $3; } | '-' number { $$ = -$2; } - | '*' expression { printf("deref: %u\n", $2); } + | '*' expression { $$ = vaddr_read($2, WORD_BYTES * 8); } | '(' expression ')' { $$ = $2; } number