diff --git a/nemu/src/monitor/sdb/addrexp.y b/nemu/src/monitor/sdb/addrexp.y index 9e1f2bf..f60ddd2 100644 --- a/nemu/src/monitor/sdb/addrexp.y +++ b/nemu/src/monitor/sdb/addrexp.y @@ -1,5 +1,6 @@ %code requires { #include + #include #include #include extern int yylex(void); @@ -41,6 +42,7 @@ expression $$ = $1 / $3; } | '-' number { $$ = -$2; } + | '*' expression { printf("deref: %u\n", $2); } | '(' expression ')' { $$ = $2; } number