From eade3e8e4423a049ce0f9ae91d2070532873502c Mon Sep 17 00:00:00 2001 From: vsc Date: Thu, 27 Dec 2001 22:38:41 +0000 Subject: [PATCH] fix debugger when tracing over system builtins. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@241 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/dbase.c | 13 +++++++++++++ C/init.c | 2 +- pl/debug.yap | 10 ++++------ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/C/dbase.c b/C/dbase.c index c0749a1ec..85a6f697d 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -606,6 +606,7 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end, #ifdef COROUTINING Term ConstraintsTerm = TermNil; CELL *ConstraintsBottom = NULL; + CELL *origH = H; #endif loop: @@ -932,6 +933,9 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end, /* we're done */ *vars_foundp = vars_found; UNWIND_CUNIF(); +#ifdef COROUTINING + H = origH; +#endif return(CodeMax); error: @@ -947,6 +951,9 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end, } #endif UNWIND_CUNIF(); +#ifdef COROUTINING + H = origH; +#endif return(NULL); error2: @@ -962,6 +969,9 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end, } #endif UNWIND_CUNIF(); +#ifdef COROUTINING + H = origH; +#endif return(NULL); #if !OS_HANDLES_TR_OVERFLOW @@ -978,6 +988,9 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end, } #endif UNWIND_CUNIF(); +#ifdef COROUTINING + H = origH; +#endif return(NULL); #endif } diff --git a/C/init.c b/C/init.c index 092f5fa1c..47cb9d191 100644 --- a/C/init.c +++ b/C/init.c @@ -1036,7 +1036,7 @@ InitYaamRegs(void) AuxSp = (CELL *)AuxTop; TR = (tr_fr_ptr)TrailBase; #ifdef COROUTINING - H = H0 = ((CELL *) GlobalBase)+2048; + H = H0 = ((CELL *) GlobalBase)+ 128*1024; //2048; #else H = H0 = (CELL *) GlobalBase; #endif diff --git a/pl/debug.yap b/pl/debug.yap index 1f04e6c15..1c80434b8 100644 --- a/pl/debug.yap +++ b/pl/debug.yap @@ -251,11 +251,7 @@ debugging :- '$spy'([Mod|G]). '$spy'([Module|G]) :- % '$format'(user_error,"$spym(~w,~w)~n",[Module,G]), - ( '$hidden'(G) - ; - '$parent_pred'(0,_,_), - '$system_predicate'(G) - ), + '$hidden'(G), !, /* called from prolog module */ '$execute0'(G,Module), @@ -372,7 +368,9 @@ debugging :- '$undefp'([M|G]) ). '$spycalls'(G,M,_) :- - '$flags'(G,M,F,_), F /\ 8'50000 =\= 0, % Standard and C pred + '$system_predicate'(G), + '$flags'(G,M,F,_), + F /\ 0xc00000 =:= 0, % but not meta-predicate or cut transparent !, '$catch_spycall_stdpred'(G,M), (true;