> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar  1 12:35:11 UTC 2024 x86_64 GNU/Linux
 17:57:07  up   7:33,  2 users,  load average: 0.22, 0.37, 0.47
This commit is contained in:
tracer-ysyx 2024-03-13 17:57:07 +08:00 committed by xinyangli
parent 1f1ec6654b
commit e0e14d7ca4

View file

@ -67,12 +67,13 @@ void init_mem() {
char range[sizeof(CONFIG_MTRACE_RANGE)] = CONFIG_MTRACE_RANGE;
char *saveptr, *ptr;
ptr = strtok_r(range, ",", &saveptr);
for (range_count = 0; range_count < CONFIG_MTRACE_RANGE_MAX; range_count++) {
for (range_count = 0; range_count < CONFIG_MTRACE_RANGE_MAX; ) {
word_t start, end;
Assert(sscanf(ptr, "%d-%d", &start, &end) == 2, "Config option MTRACE_RANGE has wrong format");
Assert(sscanf(ptr, "%x-%x", &start, &end) == 2, "Config option MTRACE_RANGE has wrong format");
mtrace_start[range_count] = start;
mtrace_end[range_count] = end;
range_count++;
ptr = strtok_r(NULL, ",", &saveptr);
if (!ptr) break;
}