This commit is contained in:
Vitor Santos Costa 2018-10-05 10:27:03 +01:00
parent 5ea98bcf53
commit 4f292cb521
6 changed files with 25 additions and 28 deletions

View File

@ -327,7 +327,7 @@ inline static bool do_execute(Term t, Term mod USES_REGS) {
/* I cannot use the standard macro here because
otherwise I would dereference the argument and
might skip a svar */
if (pen->PredFlags & (MetaPredFlag | UndefPredFlag)) {
if (pen->PredFlags & (MetaPredFlag | UndefPredFlag | SpiedPredFlag)) {
return CallMetaCall(t0, mod0 PASS_REGS);
}
pt = RepAppl(t) + 1;

View File

@ -354,6 +354,7 @@ static inline bool verboseMode(void) {
return GLOBAL_Flags[VERBOSE_FLAG].at != TermSilent;
}
static inline void setVerbosity(Term val) {
GLOBAL_Flags[VERBOSE_FLAG].at = val;
}

View File

@ -298,24 +298,22 @@ be lost.
* @param _Mod_:_Goal_ is the goal to be examined.
* @return `call(Goal)`
*/
%% '$trace'([Mod|G]) :-
%% '$stop_creeping'(_),
% set_prolog_flag(debug, true),
%% !,
%% '$execute_nonstop'(G,Mod).
'$trace'([Mod|G]) :-
'$stop_creeping'(_),
current_prolog_flag(debug, false),
!,
'$execute_nonstop'(G,Mod).
'$trace'([Mod|G]) :-
CP is '$last_choice_pt',
'$trace_query'(G, Mod, CP, G, EG),
gated_call(
'$debugger_input',
EG,
E,
'$continue_debugging'(E)
).
CP is '$last_choice_pt',
'$trace_query'(G, Mod, CP, G, EG),
gated_call(
'$debugger_input',
EG,
E,
'$continue_debugging'(E)
).
'$continue_debugging'(_) :- !,
current_prolog_flag(debug, false).
'$continue_debugging'(exit) :- !, '$creep'.
'$continue_debugging'(answer) :- !, '$creep'.
'$continue_debugging'(fail) :- !, '$creep'.
@ -694,9 +692,6 @@ be lost.
CP is '$last_choice_point',
Goal.
'$port'(_P,_G,_Module,_L,_Determinic, _Info ) :- %%> debugging done
current_prolog_flag(debug, false),
!.
'$port'(_P, _G, _M,GoalNumber,_Determinic, _Info ) :- %%> leap
'__NB_getval__'('$debug_status',state(leap,Border,_), fail),
GoalNumber > Border,

View File

@ -94,7 +94,8 @@ error_handler(Error, Level) :-
'$LoopError'(Error, Level).
'$LoopError'(_, _) :-
flush_output(user_output),
stop_low_level_trace,
flush_output(user_output),
flush_output(user_error),
fail.
'$LoopError'(Error, Level) :- !,

View File

@ -558,11 +558,11 @@ Restores a previously saved state of YAP contaianing a qly file _F_.
*/
qload_file( F0 ) :-
( current_prolog_flag(verbose_load, false)
( current_prolog_flag(verbose_load, true)
->
Verbosity = silent
;
Verbosity = informational
;
Verbosity = silent
),
StartMsg = loading_module,
EndMsg = module_loaded,

View File

@ -241,13 +241,13 @@ Switches on the debugger and enters tracing mode.
*/
trace :-
'$init_debugger',
'$init_debugger',
fail.
trace :-
'__NB_setval__'('$trace',on),
'$start_debugging'(on),
print_message(informational,debug(trace)),
'$creep'.
'__NB_setval__'('$trace',on),
'$start_debugging'(on),
print_message(informational,debug(trace)),
'$creep'.
/** @pred notrace