next up previous contents
Next: 3.3 Stack Frames Up: 3 The Debugger Previous: 3.1 Debugger Introduction

3.2 The Command Loop

The debugger is an interactive read-eval-print loop much like the normal top-level, but some symbols are interpreted as debugger commands instead of being evaluated. A debugger command starts with the symbol name of the command, possibly followed by some arguments on the same line. Some commands prompt for additional input. Debugger commands can be abbreviated by any unambiguous prefix: help can be typed as h, he, etc. For convenience, some commands have ambiguous one-letter abbreviations: f for frame.

The package is not significant in debugger commands; any symbol with the name of a debugger command will work. If you want to show the value of a variable that happens also to be the name of a debugger command, you can use the list-locals command or the debug:var function, or you can wrap the variable in a progn to hide it from the command loop.

The debugger prompt is ``frame]'', where frame is the number of the current frame. Frames are numbered starting from zero at the top (most recent call), increasing down to the bottom. The current frame is the frame that commands refer to. The current frame also provides the lexical environment for evaluation of non-command forms.

  The debugger evaluates forms in the lexical environment of the functions being debugged. The debugger can only access variables. You can't go or return-from into a function, and you can't call local functions. Special variable references are evaluated with their current value (the innermost binding around the debugger invocation)--you don't get the value that the special had in the current frame. See section 3.4 for more information on debugger variable access.



Raymond Toy
Mon Jul 14 09:11:27 EDT 1997