NextPrevUpTopContentsIndex

3.4.1 Backtracing

A backtrace is a list of the stack frames starting at the current frame and continuing down the stack. The backtrace thus displays the sequence by which the functions were invoked, starting with the most recent. For instance:

CL-USER 10 > (defun function-1 (a b c)
               (function-2 (+ a b) c))
FUNCTION-1
 
CL-USER 11 > (defun function-2 (a b)
               (function-3 (+ a b)))
FUNCTION-2
 
CL-USER 12 > (defun function-3 (a) (/ 3 (- 111 a)))
FUNCTION-3
 
CL-USER 13 > (function-1 1 10 100)
 
Error: Division-by-zero caused by / of (3 0)
  1 (continue) Return a value to use
  2 Supply new arguments to use
  3 (abort) return to level 0.
  4 return to top loop level 0.
  5 Destroy process.
 
Type :c followed by a number to proceed
 
CL-USER 14 : 1 > :bq 10
 
SYSTEM::DIVISION-BY-ZERO-ERROR <- / <- FUNCTION-3
<- SYSTEM::*%APPLY-INTERPRETED-FUNCTION <- FUNCTION-2
<- SYSTEM::*%APPLY-INTERPRETED-FUNCTION <- FUNCTION-1
<- SYSTEM::*%APPLY-INTERPRETED-FUNCTION <- SYSTEM::%INVOKE <- SYSTEM::%EVAL
 
CL-USER 15 : 1 > 

In the above example the command to show a quick backtrace was used ( :bq ). Instead of showing each stack frame fully, this only shows the function name associated with each of the call frames. The number 10 following :bq specifies that only the next ten frames should be displayed rather than continuing to the bottom of the stack.

:b

Debugger command

:b &optional verbose m

This is the command to obtain a backtrace from the current frame. It may optionally be followed by :verbose , in which case a fuller description of each frame is given that includes the values of the arguments to the function calls. It may also be followed by a number ( m ), specifying that only that number of frames should be displayed.

:bq

Debugger command

:bq m

This produces a quick backtrace from the current position. Only the call frames are included, and only the names of the associated functions are shown. If the command is followed by a number then only that many frames are displayed.


LispWorks User Guide - 7 Jul 2004

NextPrevUpTopContentsIndex