diff --git a/src/Makefile.in b/src/Makefile.in index 6eea9f07ed3e25cb7efff1d10c49b284e5bf4a65..5a22d3a7a3102af145d097783e4c22b7d5ae4d1f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.254 2001/04/21 15:32:39 grubba Exp $ +# $Id: Makefile.in,v 1.255 2001/04/25 21:26:45 hubbe Exp $ # # This line is needed on some machines. @@ -246,7 +246,7 @@ $(TMP_BUILDDIR)/tpike: precompile.sh-stamp # the recursive make of tpike-real above, that one will never start to # make the $(OBJ)s concurrently with this one. stamp-tpike-predep # records the $(POBJ) dependencies without tpike. -pike: $(OBJ) master.pike modules/linker_options stamp-tpike-predep post_modules/linker_options +pike: $(OBJ) master.pike pike.syms modules/linker_options stamp-tpike-predep post_modules/linker_options $(MAKE) $(MAKE_FLAGS) $(MAKE_PARALLEL) $(POBJ) -@if [ -f pike.old ] ; then rm -f pike.old || : ; else : ; fi -@if [ -f pike.old.exe ] ; then rm -f pike.old.exe || : ; else : ; fi @@ -504,6 +504,10 @@ master.pike: $(LIBDIR_SRC)/master.pike.in Makefile sed -e 's!�lib_prefix�!'"`echo "$(TMP_LIBDIR)" | sed -e "$$t"`"'!' <$(LIBDIR_SRC)/master.pike.in \ | sed -e 's!�share_prefix�!'"`echo "$(LIBDIR_SRC)" | sed -e "$$t"`"'!' >master.pike +pike.syms: $(SRCDIR)/interpret.c $(SRCDIR)/interpreter.h $(SRCDIR)/program.c $(SRCDIR)/builtin_functions.c + ( cat $(SRCDIR)/*.h *.h | egrep '^[ ]*#[ ]*define[ ][ ]*[a-zA-Z_0-9]*[ ][ ]*[0-9][xabcdefABCDEF0-9]*[ ]*' ; \ + echo "#define" `$(CPP) $(PREFLAGS) -DSTEP_BREAK_LINE='STEP_BREAK_LINE __LINE__' $(SRCDIR)/interpreter.h | grep STEP_BREAK_LINE` ) >pike.syms + pike-module: $(SRCDIR)/pike-module.in Makefile ./pike $(RUNPIKE) $(SRCDIR)/pike-module.in --fixate=$(SRCDIR)/pike-module.in \ --set='make=$(MAKE)' --set='make_flags=$(MAKE_FLAGS)' \ @@ -595,6 +599,14 @@ lexer1.h: lexer.h lexer2.h: lexer.h cp "$(SRCDIR)/lexer.h" "$@" + +# unbug needs interpreter_nd.h to be able to +# set separate breakpoints in eval_instruction_with/without_debug +interpreter_debug.h: interpreter.h + cp "$(SRCDIR)/interpreter.h" "$@" + +interpret.o: interpreter_debug.h + # All the $(POBJ) dependencies, except tpike. See blurb at pike target. stamp-tpike-predep: $(SRCDIR)/peep.in $(TMP_BINDIR)/mkpeep.pike peep.c $(SRCDIR)/UnicodeData.txt $(TMP_BINDIR)/make_ci.pike builtin_functions.c $(SRCDIR)/treeopt.in $(TMP_BINDIR)/mktreeopt.pike las.c @echo foo > stamp-tpike-predep diff --git a/src/interpret.c b/src/interpret.c index 76743c38c2df0672429a96dea8b807f9a618ed72..225e5fa49fafc7d795f0438401d93c7579d4b4d8 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: interpret.c,v 1.191 2001/04/14 09:44:20 hubbe Exp $"); +RCSID("$Id: interpret.c,v 1.192 2001/04/25 21:26:45 hubbe Exp $"); #include "interpret.h" #include "object.h" #include "program.h" @@ -786,7 +786,7 @@ static void restore_light_frame_info(struct light_frame_info *info) #ifdef PIKE_DEBUG #define eval_instruction eval_instruction_with_debug -#include "interpreter.h" +#include "interpreter_debug.h" #undef eval_instruction #define eval_instruction eval_instruction_without_debug diff --git a/src/interpret_functions.h b/src/interpret_functions.h index 5ed2a9d2c2b588a015109ac7587087a40312b9b4..86d472db670a9223040007d82a24c7346db8f325 100644 --- a/src/interpret_functions.h +++ b/src/interpret_functions.h @@ -1,5 +1,5 @@ /* - * $Id: interpret_functions.h,v 1.50 2001/03/19 00:42:11 grubba Exp $ + * $Id: interpret_functions.h,v 1.51 2001/04/25 21:26:46 hubbe Exp $ * * Opcode definitions for the interpreter. */ @@ -1723,3 +1723,11 @@ OPCODE0_JUMP(F_TAIL_RECUR,"tail recursion") pc=addr; } BREAK + +OPCODE0(F_BREAKPOINT,"breakpoint") +{ + extern void o_breakpoint(void); + o_breakpoint(); + pc--; +} +BREAK; diff --git a/src/interpreter.h b/src/interpreter.h index 11d270f2b841f504b65e18095d49074da2ef9f51..6fb0fff6ad826869035956ee4cb79f6f0ba60dc9 100644 --- a/src/interpreter.h +++ b/src/interpreter.h @@ -36,6 +36,10 @@ #define DOJUMP() \ do { int tmp; tmp=GET_JUMP(); pc+=tmp; if(tmp < 0) fast_check_threads_etc(6); }while(0) +#ifndef STEP_BREAK_LINE +#define STEP_BREAK_LINE +#endif + static int eval_instruction(unsigned char *pc) { unsigned INT32 prefix2=0,instr, prefix=0; @@ -45,6 +49,8 @@ static int eval_instruction(unsigned char *pc) Pike_fp->pc = pc; instr=EXTRACT_UCHAR(pc++); + STEP_BREAK_LINE + #ifdef PIKE_DEBUG if(t_flag > 2) { diff --git a/src/opcodes.c b/src/opcodes.c index c35c6fd004cb68769f9bd1ea443665d61fd63667..891c614d3d19d00a8d9ea5c28a8a55d9bc1bdd25 100644 --- a/src/opcodes.c +++ b/src/opcodes.c @@ -26,7 +26,7 @@ #include "bignum.h" #include "operators.h" -RCSID("$Id: opcodes.c,v 1.105 2001/03/31 15:41:58 grubba Exp $"); +RCSID("$Id: opcodes.c,v 1.106 2001/04/25 21:26:46 hubbe Exp $"); void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind) { @@ -1859,3 +1859,8 @@ PMOD_EXPORT void f_sscanf(INT32 args) push_array(a); } + +void o_breakpoint(void) +{ + /* Does nothing */ +}