diff --git a/nemu/Kconfig b/nemu/Kconfig index adc8183..cd9b909 100644 --- a/nemu/Kconfig +++ b/nemu/Kconfig @@ -164,7 +164,7 @@ config MTRACE config MTRACE_RANGE depends on MTRACE string "Memory trace active range" - default "0-fffffff" + default "0-0xfffffff" help Memory tracer will only print memory access in these ranges. Use comma to seperate between ranges. diff --git a/nemu/src/memory/paddr.c b/nemu/src/memory/paddr.c index d34fec6..b694c85 100644 --- a/nemu/src/memory/paddr.c +++ b/nemu/src/memory/paddr.c @@ -69,7 +69,7 @@ void init_mem() { ptr = strtok_r(range, ",", &saveptr); for (range_count = 0; range_count < CONFIG_MTRACE_RANGE_MAX; ) { word_t start, end; - Assert(sscanf(ptr, FMT_WORD "-" FMT_WORD, &start, &end) == 2, "Config option MTRACE_RANGE has wrong format"); + Assert(sscanf(ptr, FMT_PADDR "-" FMT_PADDR, &start, &end) == 2, "Config option MTRACE_RANGE has wrong format"); mtrace_start[range_count] = start; mtrace_end[range_count] = end;