Next: The Command Loop
Up: The Debugger
Previous: The Debugger
  Contents
  Index
The CMU Common Lisp debugger is unique in its level of support for source-level
debugging of compiled code. Although some other debuggers allow access of
variables by name, this seems to be the first Common Lisp debugger that:
- Tells you when a variable doesn't have a value because it hasn't been
initialized yet or has already been deallocated, or
- Can display the precise source location corresponding to a code
location in the debugged program.
These features allow the debugging of compiled code to be made almost
indistinguishable from interpreted code debugging.
The debugger is an interactive command loop that allows a user to examine
the function call stack. The debugger is invoked when:
- A serious-condition is signaled, and it is not handled, or
- error is called, and the condition it signals is not handled, or
- The debugger is explicitly invoked with the Common Lisp break
or debug functions.
Note: there are two debugger interfaces in CMU CL: the TTY debugger
(described below) and the Motif debugger. Since the difference is only in the
user interface, much of this chapter also applies to the Motif version.
See section motif-interface for a very brief discussion of the graphical
interface.
When you enter the TTY debugger, it looks something like this:
Error in function CAR.
Wrong type argument, 3, should have been of type LIST.
Restarts:
0: Return to Top-Level.
Debug (type H for help)
(CAR 3)
0]
The first group of lines describe what the error was that put us in the
debugger. In this case car was called on 3. After Restarts:
is a list of all the ways that we can restart execution after this error. In
this case, the only option is to return to top-level. After printing its
banner, the debugger prints the current frame and the debugger prompt.
Next: The Command Loop
Up: The Debugger
Previous: The Debugger
  Contents
  Index
Peter Van Eynde
2000-02-08