From 874fc979707f1f49a532160ecafe4558d1c34f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Sun, 3 Mar 2013 20:26:48 -0600 Subject: [PATCH] leave system mode --- pl/debug.yap | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pl/debug.yap b/pl/debug.yap index f7b707631..f3ac908bf 100644 --- a/pl/debug.yap +++ b/pl/debug.yap @@ -175,6 +175,14 @@ trace :- print_message(informational,debug(trace)), '$meta_creep'. +'$do_trace' :- + nb_getval('$trace',on), !. +'$do_trace' :- + nb_setval('$trace',on), + '$start_debugging'(on), + print_message(informational,debug(trace)), + '$creep'. + notrace :- nodebug. @@ -284,6 +292,7 @@ debugging :- '$execute_nonstop'(G,Mod). '$spy'([Mod|G]) :- '$in_system_mode', !, + '$exit_system_mode', '$execute_nonstop'(G,Mod). '$spy'([Mod|G]) :- CP is '$last_choice_pt', @@ -492,6 +501,7 @@ debugging :- '$spycall'(G, M, _, _) :- nb_getval('$debug_jump',true), !, + '$exit_system_mode', '$execute_nonstop'(G,M). '$spycall'(G, M, _, _) :- ( @@ -771,9 +781,11 @@ debugging :- '$execute_creep_dgoal'(G). '$execute_dgoal'('$execute_nonstop'(G,M)) :- - '$execute_nonstop'(G,M). + '$exit_system_mode', + '$execute_nonstop'(G,M). '$execute_dgoal'('$execute_clause'(G, M, R, CP)) :- - '$execute_clause'(G, M, R, CP). + '$exit_system_mode', + '$execute_clause'(G, M, R, CP). '$execute_creep_dgoal'('$execute_nonstop'(G,M)) :- '$creep',