> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 17:45:11 up 19:54, 2 users, load average: 0.26, 0.21, 0.22
This commit is contained in:
@ -170,22 +170,6 @@ void sdb_set_batch_mode() {
|
||||
is_batch_mode = true;
|
||||
}
|
||||
|
||||
int test_expr() {
|
||||
init_regex();
|
||||
uint32_t expect, res;
|
||||
char buf[65536] = {0};
|
||||
if (scanf("%"PRIu32" %s", &expect, buf));
|
||||
bool success = false;
|
||||
res = expr(buf, &success);
|
||||
if (res == expect) {
|
||||
printf("True :");
|
||||
} else {
|
||||
printf("Failed:");
|
||||
}
|
||||
printf("%"PRIuLEAST32" : %"PRIuLEAST32"\n", expect, res);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sdb_mainloop() {
|
||||
#ifdef _TEST_SDB_MAIN_LOOP_
|
||||
Log("_TEST_SDB_MAIN_LOOP_");
|
||||
@ -235,3 +219,19 @@ void init_sdb() {
|
||||
/* Initialize the watchpoint pool. */
|
||||
init_wp_pool();
|
||||
}
|
||||
|
||||
int test_expr() {
|
||||
init_sdb();
|
||||
uint32_t expect, res;
|
||||
char buf[65536] = {0};
|
||||
if (scanf("%"PRIu32" %s", &expect, buf));
|
||||
bool success = false;
|
||||
res = expr(buf, &success);
|
||||
if (res == expect) {
|
||||
printf("True :");
|
||||
} else {
|
||||
printf("Failed:");
|
||||
}
|
||||
printf("%"PRIuLEAST32" : %"PRIuLEAST32"\n", expect, res);
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user