> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux
 22:35:40  up 3 days 21:36,  2 users,  load average: 1.54, 1.13, 0.98
This commit is contained in:
tracer-ysyx 2024-01-11 22:35:40 +08:00 committed by xinyangli
parent 14ae14bd41
commit 074ac0a663

View file

@ -123,14 +123,18 @@ static word_t parse_uint(const char *arg, bool *success) {
}
}
static word_t parse_expr(const char *arg, bool *success) {
static paddr_t parse_expr(const char *arg, bool *success) {
if (arg == NULL) {
puts("Invalid expr argument.");
*success = false;
return 0;
} else {
bool res = false;
// FIXME: We cannot use `parse_uint` here, it accept `-1234` as input
paddr_t addr = parse_uint(arg, &res);
*success = res;
return addr;
}
return 0;
}
static int cmd_c(char *args) {