> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.1.71 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jan  5 14:18:41 UTC 2024 x86_64 GNU/Linux
 16:27:37  up 2 days  5:22,  2 users,  load average: 0.21, 0.59, 0.70
This commit is contained in:
tracer-ysyx 2024-01-15 16:27:37 +08:00 committed by xinyangli
parent dd8a42d378
commit 7ccd5d8e83
4 changed files with 24 additions and 3 deletions

View file

@ -5,6 +5,7 @@
%% %%
$[a-zA-Z] { }
0[xX][0-9a-fA-F]+ { yylval = strtoul(yytext, NULL, 16); return HEX_NUMBER; } 0[xX][0-9a-fA-F]+ { yylval = strtoul(yytext, NULL, 16); return HEX_NUMBER; }
[0-9]+ { yylval = strtoul(yytext, NULL, 10); return NUMBER; } [0-9]+ { yylval = strtoul(yytext, NULL, 10); return NUMBER; }
[+\-*/()] { return *yytext; } [+\-*/()] { return *yytext; }

View file

@ -14,6 +14,7 @@
%} %}
%token NUMBER HEX_NUMBER %token NUMBER HEX_NUMBER
%token REGISTER
%start input %start input
%define api.value.type { word_t } %define api.value.type { word_t }
%parse-param { uint32_t *result } %parse-param { uint32_t *result }

View file

@ -18,4 +18,19 @@
#include <common.h> #include <common.h>
enum ExprType {
EXPR_TYPE_MEM_ADDR,
EXPR_TYPE_REG
};
union ExprValue {
word_t addr;
word_t *reg;
};
typedef struct ExprResult {
union ExprValue val;
enum ExprType type;
} ExprResult;
#endif #endif

View file

@ -97,8 +97,12 @@ int wp_remove_by_number(int number) {
return 0; return 0;
} }
// int wp_eval_all(char *) { int wp_eval_all() {
WP *wp;
// } for (wp = head; wp != NULL; wp = wp->next) {
}
return 0;
}
/* TODO: Implement the functionality of watchpoint */ /* TODO: Implement the functionality of watchpoint */