Changeset 4560 for trunk/compiler

Show
Ignore:
Timestamp:
11/01/08 20:20:46 (2 months ago)
Author:
pmoura
Message:

Added a "unify" command to the Logtalk built-in debugger.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r4559 r4560  
    38933893    (   '$lgt_dbg_debugging_', \+ '$lgt_dbg_skipping_' -> 
    38943894        (   '$lgt_dbg_port'(call, N, Goal, _, DbgCtx, CAction), 
    3895             (   CAction == ignore -> 
     3895            (   (CAction == ignore; CAction == unify) -> 
    38963896                true 
    38973897            ;   call(CAction), 
     
    39833983'$lgt_dbg_valid_port_option'(f, rule, _) :- !. 
    39843984'$lgt_dbg_valid_port_option'(f, redo, _) :- !. 
     3985'$lgt_dbg_valid_port_option'(u, call, _) :- !. 
    39853986'$lgt_dbg_valid_port_option'(n, _, _) :- !. 
    39863987'$lgt_dbg_valid_port_option'(!, _, _) :- !. 
     
    40234024'$lgt_dbg_do_port_option'(f, _, _, _, _, fail). 
    40244025 
     4026'$lgt_dbg_do_port_option'(u, _, Goal, _, _, Result) :- 
     4027    write('  |: '), 
     4028    read(Term), 
     4029    (   Goal = Term -> 
     4030        Result = unify 
     4031    ;   Result = fail 
     4032    ). 
     4033 
    40254034'$lgt_dbg_do_port_option'(t, _, _, _, _, _) :- 
    40264035    (   '$lgt_dbg_tracing_' -> 
     
    41124121    write('      i - ignore (ignores goal, assumes that it succeeded; only valid at call and redo ports)'), nl, 
    41134122    write('      f - fail (forces backtracking; may also be used to convert an exception into a failure)'), nl, 
     4123    write('      u - unify (reads and unifies a term with the current goal; only valid at the call port)'), nl, 
    41144124    write('      n - nodebug (turns off debugging)'), nl, 
    41154125    write('      ! - command (reads and executes a query)'), nl,