MTS 8: LISP and SLIP in MTS
June 1976
the value of X and the value of (CAR Y) are printed.
The difference between using AT and entering X and
(CAR Y) directly into BREAKFUNCTION is that AT evalu-
ates its input as of BREAKPOINTER. This provides a
way of examining variables or forms at a particular
point on the stack. For example,
F FOO -1 FOO
AT X
allows the user to examine the value of X in an
earlier call to FOO.
AT can also be used on the BREAKCMDS list. The next
element of the BREAKCMDS list is then treated as the
list of arguments. For example, if BREAKCMDS is (EVAL
AT (X (CAR Y) GO), BREAKEXPR will be evaluated, values
of X and (CAR Y) will be printed, and the function
will be exited after its value has been printed.
FROM [form] FROM exits the break by undoing the push-down stack
back to BREAKPOINTER. If "form" is not specified,
reevaluation continues with the form on the push-down
stack at BREAKPOINTER. If "form" is specified, the
function call on the push-down stack at BREAKPOINTER
is replaced by "form", and evaluation continues with
"form" which is evaluated in the context of BREAK-
POINTER. There is no way of recovering the break
because the push-down stack has been undone. FROM
allows the user to return a particular value for any
function call on the stack. To return 1 as the value
of the previous call to FOO:
:F FOO
:FROM 1
Backtrace Commands __________________
The backtrace commands print information about function calls on the
push-down list. The information is printed in reverse order to that in
which calls were made. All backtraces start at BREAKPOINTER.
BKF BKF gives a backtrace of the CARs of forms that are
still pending.
BKE BKE gives a backtrace of the expressions which called
functions still pending (i.e., it prints the function
calls themselves instead of only the names, as in
BKF).
106 LISP Debugging Facilities