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);