usabiity
This commit is contained in:
parent
5ea98bcf53
commit
4f292cb521
2
C/exec.c
2
C/exec.c
@ -327,7 +327,7 @@ inline static bool do_execute(Term t, Term mod USES_REGS) {
|
|||||||
/* I cannot use the standard macro here because
|
/* I cannot use the standard macro here because
|
||||||
otherwise I would dereference the argument and
|
otherwise I would dereference the argument and
|
||||||
might skip a svar */
|
might skip a svar */
|
||||||
if (pen->PredFlags & (MetaPredFlag | UndefPredFlag)) {
|
if (pen->PredFlags & (MetaPredFlag | UndefPredFlag | SpiedPredFlag)) {
|
||||||
return CallMetaCall(t0, mod0 PASS_REGS);
|
return CallMetaCall(t0, mod0 PASS_REGS);
|
||||||
}
|
}
|
||||||
pt = RepAppl(t) + 1;
|
pt = RepAppl(t) + 1;
|
||||||
|
@ -354,6 +354,7 @@ static inline bool verboseMode(void) {
|
|||||||
return GLOBAL_Flags[VERBOSE_FLAG].at != TermSilent;
|
return GLOBAL_Flags[VERBOSE_FLAG].at != TermSilent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void setVerbosity(Term val) {
|
static inline void setVerbosity(Term val) {
|
||||||
GLOBAL_Flags[VERBOSE_FLAG].at = val;
|
GLOBAL_Flags[VERBOSE_FLAG].at = val;
|
||||||
}
|
}
|
||||||
|
31
pl/debug.yap
31
pl/debug.yap
@ -298,24 +298,22 @@ be lost.
|
|||||||
* @param _Mod_:_Goal_ is the goal to be examined.
|
* @param _Mod_:_Goal_ is the goal to be examined.
|
||||||
* @return `call(Goal)`
|
* @return `call(Goal)`
|
||||||
*/
|
*/
|
||||||
|
%% '$trace'([Mod|G]) :-
|
||||||
|
%% '$stop_creeping'(_),
|
||||||
|
% set_prolog_flag(debug, true),
|
||||||
|
%% !,
|
||||||
|
%% '$execute_nonstop'(G,Mod).
|
||||||
'$trace'([Mod|G]) :-
|
'$trace'([Mod|G]) :-
|
||||||
'$stop_creeping'(_),
|
CP is '$last_choice_pt',
|
||||||
current_prolog_flag(debug, false),
|
'$trace_query'(G, Mod, CP, G, EG),
|
||||||
!,
|
gated_call(
|
||||||
'$execute_nonstop'(G,Mod).
|
'$debugger_input',
|
||||||
'$trace'([Mod|G]) :-
|
EG,
|
||||||
CP is '$last_choice_pt',
|
E,
|
||||||
'$trace_query'(G, Mod, CP, G, EG),
|
'$continue_debugging'(E)
|
||||||
gated_call(
|
).
|
||||||
'$debugger_input',
|
|
||||||
EG,
|
|
||||||
E,
|
|
||||||
'$continue_debugging'(E)
|
|
||||||
).
|
|
||||||
|
|
||||||
|
|
||||||
'$continue_debugging'(_) :- !,
|
|
||||||
current_prolog_flag(debug, false).
|
|
||||||
'$continue_debugging'(exit) :- !, '$creep'.
|
'$continue_debugging'(exit) :- !, '$creep'.
|
||||||
'$continue_debugging'(answer) :- !, '$creep'.
|
'$continue_debugging'(answer) :- !, '$creep'.
|
||||||
'$continue_debugging'(fail) :- !, '$creep'.
|
'$continue_debugging'(fail) :- !, '$creep'.
|
||||||
@ -694,9 +692,6 @@ be lost.
|
|||||||
CP is '$last_choice_point',
|
CP is '$last_choice_point',
|
||||||
Goal.
|
Goal.
|
||||||
|
|
||||||
'$port'(_P,_G,_Module,_L,_Determinic, _Info ) :- %%> debugging done
|
|
||||||
current_prolog_flag(debug, false),
|
|
||||||
!.
|
|
||||||
'$port'(_P, _G, _M,GoalNumber,_Determinic, _Info ) :- %%> leap
|
'$port'(_P, _G, _M,GoalNumber,_Determinic, _Info ) :- %%> leap
|
||||||
'__NB_getval__'('$debug_status',state(leap,Border,_), fail),
|
'__NB_getval__'('$debug_status',state(leap,Border,_), fail),
|
||||||
GoalNumber > Border,
|
GoalNumber > Border,
|
||||||
|
@ -94,7 +94,8 @@ error_handler(Error, Level) :-
|
|||||||
'$LoopError'(Error, Level).
|
'$LoopError'(Error, Level).
|
||||||
|
|
||||||
'$LoopError'(_, _) :-
|
'$LoopError'(_, _) :-
|
||||||
flush_output(user_output),
|
stop_low_level_trace,
|
||||||
|
flush_output(user_output),
|
||||||
flush_output(user_error),
|
flush_output(user_error),
|
||||||
fail.
|
fail.
|
||||||
'$LoopError'(Error, Level) :- !,
|
'$LoopError'(Error, Level) :- !,
|
||||||
|
@ -558,11 +558,11 @@ Restores a previously saved state of YAP contaianing a qly file _F_.
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
qload_file( F0 ) :-
|
qload_file( F0 ) :-
|
||||||
( current_prolog_flag(verbose_load, false)
|
( current_prolog_flag(verbose_load, true)
|
||||||
->
|
->
|
||||||
Verbosity = silent
|
|
||||||
;
|
|
||||||
Verbosity = informational
|
Verbosity = informational
|
||||||
|
;
|
||||||
|
Verbosity = silent
|
||||||
),
|
),
|
||||||
StartMsg = loading_module,
|
StartMsg = loading_module,
|
||||||
EndMsg = module_loaded,
|
EndMsg = module_loaded,
|
||||||
|
10
pl/spy.yap
10
pl/spy.yap
@ -241,13 +241,13 @@ Switches on the debugger and enters tracing mode.
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
trace :-
|
trace :-
|
||||||
'$init_debugger',
|
'$init_debugger',
|
||||||
fail.
|
fail.
|
||||||
trace :-
|
trace :-
|
||||||
'__NB_setval__'('$trace',on),
|
'__NB_setval__'('$trace',on),
|
||||||
'$start_debugging'(on),
|
'$start_debugging'(on),
|
||||||
print_message(informational,debug(trace)),
|
print_message(informational,debug(trace)),
|
||||||
'$creep'.
|
'$creep'.
|
||||||
|
|
||||||
/** @pred notrace
|
/** @pred notrace
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user