3.3.3 Examining and moving through the stack
The Debugger provides the following commands to move through the stack:
:ncommand moves one frame down toward the bottom of the stack.
:pcommand moves one frame up toward the top of the stack.
:>command moves to the frame at the bottom of the stack.
:<command moves to the frame at the top of the stack.
> (defun square (x) (* x x)) SQUAREIf you call the function with a symbol passed as the function argument, you enter the Debugger:
> (square 'a) >>Error: The value of RESULT, A, should be a NUMBER *: Rest arg 0 (RESTARG): (A A) :C 0: Use a new value :A 1: Abort to Lisp Top Level ->You can move down one stack frame, toward the previously called function, and display that frame by using the
-> :n SQUARE: Original code: (NAMED-LAMBDA SQUARE (X) (BLOCK SQUARE (* X X))) Required arg 0 (X): A ->You can move up one stack frame, toward the most recently called function, by using the
-> :p *: Rest arg 0 (RESTARG): (A A)You can move to the top of the stack by using the
:<command. The current frame contains the function that invokes the Debugger:
-> :< INVOKE-DEBUGGER: Required arg 0 (CONDITION): #<Condition TYPE-ERROR 79792B> ->
Generated with Harlequin WebMaker