> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 1 12:35:11 UTC 2024 x86_64 GNU/Linux 01:52:09 up 15:28, 2 users, load average: 0.54, 0.46, 0.44
This commit is contained in:
parent
061167cd10
commit
2f1f38a359
3 changed files with 54 additions and 683 deletions
|
@ -40,6 +40,7 @@ static void welcome() {
|
|||
void sdb_set_batch_mode();
|
||||
|
||||
static char *log_file = NULL;
|
||||
static char *elf_file = NULL;
|
||||
static char *diff_so_file = NULL;
|
||||
static char *img_file = NULL;
|
||||
static int difftest_port = 1234;
|
||||
|
@ -73,6 +74,7 @@ static int parse_args(int argc, char *argv[]) {
|
|||
{"diff" , required_argument, NULL, 'd'},
|
||||
{"port" , required_argument, NULL, 'p'},
|
||||
{"help" , no_argument , NULL, 'h'},
|
||||
{"elf" , required_argument, NULL, 'f'},
|
||||
{0 , 0 , NULL, 0 },
|
||||
};
|
||||
int o;
|
||||
|
@ -82,6 +84,7 @@ static int parse_args(int argc, char *argv[]) {
|
|||
case 'p': sscanf(optarg, "%d", &difftest_port); break;
|
||||
case 'l': log_file = optarg; break;
|
||||
case 'd': diff_so_file = optarg; break;
|
||||
case 'f': elf_file = optarg; break;
|
||||
case 1: img_file = optarg; return 0;
|
||||
default:
|
||||
printf("Usage: %s [OPTION...] IMAGE [args]\n\n", argv[0]);
|
||||
|
@ -89,6 +92,7 @@ static int parse_args(int argc, char *argv[]) {
|
|||
printf("\t-l,--log=FILE output log to FILE\n");
|
||||
printf("\t-d,--diff=REF_SO run DiffTest with reference REF_SO\n");
|
||||
printf("\t-p,--port=PORT run DiffTest with port PORT\n");
|
||||
printf("\t-f,--elf=PORT elf file with debug info\n");
|
||||
printf("\n");
|
||||
exit(0);
|
||||
}
|
||||
|
@ -126,6 +130,11 @@ void init_monitor(int argc, char *argv[]) {
|
|||
/* Initialize the simple debugger. */
|
||||
init_sdb();
|
||||
|
||||
if(elf_file != NULL) {
|
||||
void init_elf(const char *path);
|
||||
init_elf(elf_file);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_ISA_loongarch32r
|
||||
IFDEF(CONFIG_ITRACE, init_disasm(
|
||||
MUXDEF(CONFIG_ISA_x86, "i686",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue