From 9d26428a28a4b746f7afe3aded054b94841124e1 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Thu, 14 Mar 2024 18:29:09 +0800 Subject: [PATCH] =?UTF-8?q?>=20compile=20NEMU=20ysyx=5F22040000=20?= =?UTF-8?q?=E6=9D=8E=E5=BF=83=E6=9D=A8=20Linux=20calcite=206.6.19=20#1-Nix?= =?UTF-8?q?OS=20SMP=20PREEMPT=5FDYNAMIC=20Fri=20Mar=20=201=2012:35:11=20UT?= =?UTF-8?q?C=202024=20x86=5F64=20GNU/Linux=20=2018:29:09=20=20up=201=20day?= =?UTF-8?q?=20=208:05,=20=202=20users,=20=20load=20average:=201.34,=200.80?= =?UTF-8?q?,=200.57?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nemu/src/monitor/monitor.c | 1 - nemu/src/utils/elf-parser.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) 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"); }