From 1ecdd3e6e2bf62975c9b831ef24e0a2b89b8e3f2 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Fri, 12 Jan 2024 16:01:06 +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.1.69=20#1-Nix?= =?UTF-8?q?OS=20SMP=20PREEMPT=5FDYNAMIC=20Wed=20Dec=2020=2016:00:29=20UTC?= =?UTF-8?q?=202023=20x86=5F64=20GNU/Linux=20=2016:01:06=20=20up=20=2016:16?= =?UTF-8?q?,=20=202=20users,=20=20load=20average:=200.51,=200.45,=200.54?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nemu/scripts/build.mk | 10 ---------- nemu/src/monitor/sdb/sdb.c | 4 ++++ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/nemu/scripts/build.mk b/nemu/scripts/build.mk index 1ff0ae8..51350e8 100644 --- a/nemu/scripts/build.mk +++ b/nemu/scripts/build.mk @@ -40,16 +40,6 @@ $(OBJ_DIR)/%.o: %.cc @$(CXX) $(CFLAGS) $(CXXFLAGS) -c -o $@ $< $(call call_fixdep, $(@:.o=.d), $@) -$(OBJ_DIR)/%-lex.l: %-exp.y - @echo + YACC $< - @mkdir -p $(dir $@) - @$(YACC) $(YFLAGS) -H $(<:.y=.h) -o $@ $< - -$(OBJ_DIR)/%.c: %-lex.l - @echo + LEX $< - @mkdir -p $(dir $@) - @$(LEX) $(LFLAGS) -o $@ $< - # Depencies -include $(OBJS:.o=.d) diff --git a/nemu/src/monitor/sdb/sdb.c b/nemu/src/monitor/sdb/sdb.c index 210fe1a..b1e3ae0 100644 --- a/nemu/src/monitor/sdb/sdb.c +++ b/nemu/src/monitor/sdb/sdb.c @@ -26,6 +26,8 @@ static int is_batch_mode = false; +extern int yyparse(void); + // command handlers static int cmd_help(char *args); static int cmd_c(char *args); @@ -284,6 +286,8 @@ void sdb_mainloop() { cmd_c(NULL); return; } + // int res = yyparse(); + // exit(res); for (char *str; (str = rl_gets()) != NULL;) { char *str_end = str + strlen(str);