> 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:
@ -7,6 +7,11 @@ menu "NEMU Configuration Options"
|
|||||||
help
|
help
|
||||||
Say Y here if you want to enable watchpoint functionality.
|
Say Y here if you want to enable watchpoint functionality.
|
||||||
This will add performance overhead but is useful for debugging.
|
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
|
endmenu
|
||||||
|
|
||||||
choice
|
choice
|
||||||
|
@ -43,7 +43,6 @@ static void trace_and_difftest(Decode *_this, vaddr_t dnpc) {
|
|||||||
bool wp_check_hit(void);
|
bool wp_check_hit(void);
|
||||||
if (wp_check_hit()) {
|
if (wp_check_hit()) {
|
||||||
printf("watchpoint hit\n");
|
printf("watchpoint hit\n");
|
||||||
isa_reg_display();
|
|
||||||
nemu_state.state = NEMU_STOP;
|
nemu_state.state = NEMU_STOP;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -102,8 +102,10 @@ static bool make_token(char *e) {
|
|||||||
char *substr_start = e + position;
|
char *substr_start = e + position;
|
||||||
int substr_len = pmatch.rm_eo;
|
int substr_len = pmatch.rm_eo;
|
||||||
|
|
||||||
|
#ifdef CONFIG_CONFIG_LOG_EXPR
|
||||||
Log("match rules[%d] = \"%s\" at position %d with len %d: %.*s",
|
Log("match rules[%d] = \"%s\" at position %d with len %d: %.*s",
|
||||||
i, rules[i].regex, position, substr_len, substr_len, substr_start);
|
i, rules[i].regex, position, substr_len, substr_len, substr_start);
|
||||||
|
#endif
|
||||||
|
|
||||||
position += substr_len;
|
position += substr_len;
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ void show_wp() {
|
|||||||
printf("No. Expr\n");
|
printf("No. Expr\n");
|
||||||
for (WP* tmp = head; tmp != NULL; tmp = tmp->next) {
|
for (WP* tmp = head; tmp != NULL; tmp = tmp->next) {
|
||||||
printf("%3d: %12s = "FMT_WORD"\n", tmp->NO, tmp->expr, tmp->val);
|
printf("%3d: %12s = "FMT_WORD"\n", tmp->NO, tmp->expr, tmp->val);
|
||||||
|
tmp->hit = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user