8 The Debugger

8.4 The stack in the debugger

The debugger allows the user to examine the state of the execution stack.

The execution stack consists of a sequence of frames. A stack frame is a description of some part of a program, or something relating to the program, which is packaged into a block of memory and placed on the stack during program execution. These frames are not directly readable as Common Lisp without the aid of the debugger.

There can be frames on the stack representing active function invocations, special variable bindings, restarts, and system-related code. In particular, the execution stack has a call frame for each active function call. That is, it stores information describing calls of functions which have been entered but not yet exited. This information details such things as the arguments with which the functions were called.

The top of the stack contains the most recently-created frames (and so the innermost calls), and the bottom of the stack contains the oldest frames (and so the outermost calls). You can examine a call frame to find the function's name, and the names and values of its arguments, and local variables.

Within the debugger there are commands to examine a stack frame, and to move around the stack. They are described below. Typing :help in the debugger will produce a list of these commands.


FreeLisp User's Guide - 5 FEB 1996

Generated with Harlequin WebMaker