Changeset 4427 for trunk/compiler
- Timestamp:
- 08/16/08 13:28:18 (5 months ago)
- Files:
-
- 1 modified
-
trunk/compiler/logtalk.pl (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/compiler/logtalk.pl
r4426 r4427 394 394 throw(error(existence_error(procedure, Functor/Arity), context(Type, Entity, _))). 395 395 396 '$lgt_runtime_error_handler'(error(logtalk_debugger_aborted)) :-397 nl, write(' Debugging session aborted by user. Debugger still on.'), nl,398 !,399 fail.400 401 396 '$lgt_runtime_error_handler'(error(Variable, _, Sender)) :- 402 397 var(Variable), … … 405 400 '$lgt_runtime_error_handler'(error(Error, user::Goal, user)) :- 406 401 throw(error(Error, Goal)). 402 403 '$lgt_runtime_error_handler'(logtalk_debugger_aborted) :- 404 write('Debugging session aborted by user. Debugger still on.'), nl, 405 abort. 407 406 408 407 '$lgt_runtime_error_handler'(Error) :- … … 3786 3785 ( '$lgt_dbg_debugging_', \+ '$lgt_dbg_skipping_' -> 3787 3786 ( '$lgt_dbg_port'(call, Goal, _, DbgCtx, CAction), 3788 ( CAction = skip -> 3789 retractall('$lgt_dbg_skipping_'), 3790 assertz('$lgt_dbg_skipping_'), 3791 CAction2 = true 3792 ; CAction2 = CAction 3793 ), 3794 ( CAction2 = ignore -> 3787 ( CAction == ignore -> 3795 3788 true 3796 ; call(CAction2), 3797 catch( 3798 call(TGoal), 3799 Error, 3800 ('$lgt_dbg_port'(exception, Goal, Error, DbgCtx, TAction), (TAction = fail -> fail; throw(Error)))), 3789 ; call(CAction), 3790 catch(TGoal, Error, '$lgt_dbg_exception'(Goal, Error, DbgCtx)), 3801 3791 ( '$lgt_dbg_port'(exit, Goal, _, DbgCtx, EAction), 3802 3792 call(EAction) 3803 3793 ; '$lgt_dbg_port'(redo, Goal, _, DbgCtx, RAction), 3804 ( RAction = skip -> 3805 retractall('$lgt_dbg_skipping_'), 3806 assertz('$lgt_dbg_skipping_') 3807 ), 3808 RAction = ignore 3794 RAction == ignore 3809 3795 ) 3810 ;3811 retractall('$lgt_dbg_skipping_'),3812 '$lgt_dbg_port'(fail, Goal, _, DbgCtx, _),fail3796 ; retractall('$lgt_dbg_skipping_'), 3797 '$lgt_dbg_port'(fail, Goal, _, DbgCtx, _), 3798 fail 3813 3799 ) 3814 3800 ), … … 3818 3804 3819 3805 3820 '$lgt_dbg_port'(exception, _, error(logtalk_debugger_aborted), _, true) :- 3821 !. 3806 '$lgt_dbg_exception'(_, logtalk_debugger_aborted, _) :- 3807 throw(logtalk_debugger_aborted). 3808 3809 '$lgt_dbg_exception'(Goal, Error, DbgCtx) :- 3810 '$lgt_dbg_port'(exception, Goal, Error, DbgCtx, TAction), 3811 ( TAction == fail -> 3812 fail 3813 ; throw(Error) 3814 ). 3815 3822 3816 3823 3817 '$lgt_dbg_port'(Port, Goal, Error, DbgCtx, Action) :- … … 3864 3858 '$lgt_dbg_valid_port_option'(i, redo, _). 3865 3859 '$lgt_dbg_valid_port_option'(f, call, _). 3860 '$lgt_dbg_valid_port_option'(f, fact, _). 3861 '$lgt_dbg_valid_port_option'(f, rule, _). 3866 3862 '$lgt_dbg_valid_port_option'(f, redo, _). 3867 3863 '$lgt_dbg_valid_port_option'(n, _, _). … … 3888 3884 retractall('$lgt_dbg_tracing_'). 3889 3885 3890 '$lgt_dbg_do_port_option'(s, Port, _, _, _, Action) :- 3891 '$lgt_dbg_do_port_option_skip'(Port, Action). 3892 3893 '$lgt_dbg_do_port_option'(i, _, _, _, _, ignore). 3886 '$lgt_dbg_do_port_option'(s, call, _, _, _, true) :- 3887 !, 3888 retractall('$lgt_dbg_skipping_'), 3889 assertz('$lgt_dbg_skipping_'). 3890 '$lgt_dbg_do_port_option'(s, redo, _, _, _, fail) :- 3891 !, 3892 retractall('$lgt_dbg_skipping_'), 3893 assertz('$lgt_dbg_skipping_'). 3894 '$lgt_dbg_do_port_option'(s, _, _, _, _, true). 3895 3896 '$lgt_dbg_do_port_option'(i, call, _, _, _, ignore). 3897 '$lgt_dbg_do_port_option'(i, redo, _, _, _, ignore). 3894 3898 3895 3899 '$lgt_dbg_do_port_option'(f, _, _, _, _, fail). … … 3947 3951 break, 3948 3952 '$lgt_dbg_resume'(Tracing) 3949 ; write(' break no supportd on thisProlog compiler.'), nl3953 ; write(' break no supportd by the back-end Prolog compiler.'), nl 3950 3954 ), 3951 3955 fail. 3952 3956 3953 3957 '$lgt_dbg_do_port_option'(a, _, _, _, _, _) :- 3954 throw(error(logtalk_debugger_aborted)). 3958 retractall('$lgt_dbg_skipping_'), 3959 throw(logtalk_debugger_aborted). 3955 3960 3956 3961 '$lgt_dbg_do_port_option'(q, _, _, _, _, _) :- … … 3977 3982 write(' l - leap (continues execution until the next spy point is found)'), nl, 3978 3983 write(' s - skip (skips debugging for the current goal; only meaningful at call and redo ports)'), nl, 3979 write(' i - ignore (ignores goal, assumes that it succeeded )'), nl,3980 write(' f - fail (forces backtracking )'), nl,3984 write(' i - ignore (ignores goal, assumes that it succeeded; only valid at call and redo ports)'), nl, 3985 write(' f - fail (forces backtracking; may also be used to convert an exception into a failure)'), nl, 3981 3986 write(' n - nodebug (turns off debugging)'), nl, 3982 3987 write(' ! - command (reads and executes a query)'), nl, … … 3998 4003 '$lgt_dbg_do_port_option'(?, Port, Goal, Error, DbgCtx, Action) :- 3999 4004 '$lgt_dbg_do_port_option'(h, Port, Goal, Error, DbgCtx, Action). 4000 4001 4002 4003 '$lgt_dbg_do_port_option_skip'(exit, true).4004 '$lgt_dbg_do_port_option_skip'(fail, true).4005 '$lgt_dbg_do_port_option_skip'(fact, true).4006 '$lgt_dbg_do_port_option_skip'(rule, true).4007 '$lgt_dbg_do_port_option_skip'(exception, true).4008 '$lgt_dbg_do_port_option_skip'(call, skip).4009 '$lgt_dbg_do_port_option_skip'(redo, skip).4010 4005 4011 4006
