> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux 21:34:25 up 21:50, 2 users, load average: 0.53, 0.70, 0.82
This commit is contained in:
parent
680b1d1913
commit
c344fcd2d2
4 changed files with 7 additions and 3114 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -78,7 +78,7 @@ typedef uint32_t YYSTYPE;
|
|||
extern YYSTYPE yylval;
|
||||
|
||||
|
||||
int yyparse (void);
|
||||
int yyparse (uint32_t *result);
|
||||
|
||||
|
||||
#endif /* !YY_YY_SRC_MONITOR_SDB_ADDREXP_H_INCLUDED */
|
||||
|
|
|
@ -23,11 +23,10 @@
|
|||
#include <readline/history.h>
|
||||
#include <readline/readline.h>
|
||||
#include <stdint.h>
|
||||
#include <addrexp.h>
|
||||
|
||||
static int is_batch_mode = false;
|
||||
|
||||
extern int yyparse(void);
|
||||
|
||||
// command handlers
|
||||
static int cmd_help(char *args);
|
||||
static int cmd_c(char *args);
|
||||
|
@ -131,10 +130,12 @@ static paddr_t parse_expr(const char *arg, bool *success) {
|
|||
*success = false;
|
||||
return 0;
|
||||
} else {
|
||||
bool res = false;
|
||||
// bool res = false;
|
||||
// FIXME: We cannot use `parse_uint` here, it accept `-1234` as input
|
||||
paddr_t addr = parse_uint(arg, &res);
|
||||
*success = res;
|
||||
// paddr_t addr = parse_uint(arg, &res);
|
||||
// *success = res;
|
||||
paddr_t addr;
|
||||
*success = yyparse(&addr);
|
||||
return addr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue