3.3 Using Debugger commands

3.3.4 Examining dynamic context markers

In the Debugger, information about catches and throws,unwind-protect forms, and special bindings is presented in dynamic context markers. A dynamic context marker contains one of the following:

The marker contains the name of a catch and its argument, which is the tag. You can specify a new argument to a catch just as you can to a local variable in the Debugger.

The marker contains an indicator thatunwind-protect forms exist;unwind-protect forms must be evaluated if you throw past them.

The marker contains the name of a special variable, the value that it had at the time of the binding, and the current value for that binding.

The Debugger provides the following special commands to move to and display dynamic context markers:

The following example demonstrates how to move to a dynamic context marker and change the tag that is its argument:

;;; Define two functions that are linked by an incorrect
;;; catch and throw.
> (defun catcher ()
    (catch 'here (thrower)))
CATCHER

> (defun thrower () (throw 'there t)) THROWER

> (compile 'catcher) CATCHER

> (catcher) >>Error: Uncaught THROW to tag THERE THROWER: Original code: (NAMED-LAMBDA THROWER NIL (BLOCK THROWER (THROW # T))) :A 0: Abort to Lisp Top Level

-> :bm THROWER <- [:CATCH HERE] <- CATCHER <- EVAL

-> :nm [:CATCH]: Catch 0 (TAG): HERE

-> :s 0 'there -> :d >>Error: Uncaught THROW to tag THERE [:CATCH]: Catch 0 (TAG): THERE :A 0: Abort to Lisp Top Level

-> :pm THROWER: Original code: (NAMED-LAMBDA THROWER NIL (BLOCK THROWER (THROW # T)))

-> :f Re-executing (THROWER), OK? (Y or N): y T >


The User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker