LispWorks User Guide and Reference Manual > 3 The Debugger

NextPrevUpTopContentsIndex

3.3 The stack in the debugger

The debugger allows you to examine the state of the execution stack. This consists of a sequence of frames representing active function invocations, special variable bindings, restarts, active catchers, active handlers and system-related code. In particular the execution stack has a call frame for each active function call (that is for each function that has been entered but from which control has not yet returned). 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.

The function call frames displayed are affected by any hcl:alias and hcl:invisible-frame declarations. See declare for the details.

Catch frames are established by using the special form catch, and exist to receive throws to the matching tag. Restart frames correspond to restarts that have been set up, and handler frames correspond to the error handlers currently active. Binding frames are formed when special variables are bound. Open frames are established by the system. By default only the catch frames and the call frames are displayed. However the remaining types of frame are displayed if you set the appropriate variables (see Debugger control variables).

Within the debugger there are commands to examine a stack frame, and to move around the stack. These are explained in the following section. Typing :help in the debugger also produces a command listing.

One of the most useful features is that you can access a local variable in the current frame simply by entering its name as shown in the backtrace. See step 7 in Example debugging session.


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex