> 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
 16:26:41 up 1 day, 15:16,  1 user,  load average: 0.99, 0.51, 0.28
This commit is contained in:
tracer-ics2023
2024-09-01 16:26:42 +08:00
committed by zzy
parent fa75b75d0b
commit ed96ef2811
4 changed files with 8 additions and 1 deletions

View File

@ -7,6 +7,11 @@ menu "NEMU Configuration Options"
help
Say Y here if you want to enable watchpoint functionality.
This will add performance overhead but is useful for debugging.
config CONFIG_LOG_EXPR
bool "Enable make_token Log"
default n
help
Say Y here if you want to enable match rules Log
endmenu
choice

View File

@ -43,7 +43,6 @@ static void trace_and_difftest(Decode *_this, vaddr_t dnpc) {
bool wp_check_hit(void);
if (wp_check_hit()) {
printf("watchpoint hit\n");
isa_reg_display();
nemu_state.state = NEMU_STOP;
}
#endif

View File

@ -102,8 +102,10 @@ static bool make_token(char *e) {
char *substr_start = e + position;
int substr_len = pmatch.rm_eo;
#ifdef CONFIG_CONFIG_LOG_EXPR
Log("match rules[%d] = \"%s\" at position %d with len %d: %.*s",
i, rules[i].regex, position, substr_len, substr_len, substr_start);
#endif
position += substr_len;

View File

@ -78,6 +78,7 @@ void show_wp() {
printf("No. Expr\n");
for (WP* tmp = head; tmp != NULL; tmp = tmp->next) {
printf("%3d: %12s = "FMT_WORD"\n", tmp->NO, tmp->expr, tmp->val);
tmp->hit = false;
}
}