diff --git a/nemu/src/monitor/monitor.c b/nemu/src/monitor/monitor.c index 1cbd9f8..1920ae4 100644 --- a/nemu/src/monitor/monitor.c +++ b/nemu/src/monitor/monitor.c @@ -133,7 +133,6 @@ void init_monitor(int argc, char *argv[]) { // printf("elf_file: %s\n", elf_file); if(elf_file != NULL) { void init_elf(const char *path); - puts("init_elf"); init_elf(elf_file); } diff --git a/nemu/src/utils/elf-parser.c b/nemu/src/utils/elf-parser.c index f98b051..8ea582b 100644 --- a/nemu/src/utils/elf-parser.c +++ b/nemu/src/utils/elf-parser.c @@ -39,9 +39,9 @@ void init_elf(const char *path) { FAILED_GOTO(failed, fgets(func, 30, elf_file) > 0); puts(func); } - + return; failed: free(sym); failed_nosym: - ; + Error("Failed reading elf file"); }