Next: Frame Information, Previous: Display Backtrace, Up: Interactive Debugger
A call stack consists of a sequence of stack frames, with each frame describing one level of the nested evaluations and applications that the program was executing when it hit a breakpoint or an error. Frames are numbered such that frame 0 is the outermost — i.e. the operation on the call stack that began least recently — and frame N-1 the innermost (where N is the total number of frames on the stack).
When you enter the debugger, the innermost frame is selected, which
means that the commands for getting information about the “current”
frame, or for evaluating expressions in the context of the current
frame, will do so by default with respect to the innermost frame. To
select a different frame, so that these operations will apply to it
instead, use the up
, down
and frame
commands like
this:
debug> up Frame 1 at standard input:36:14 [* 4 ... debug> frame 0 Frame 0 at standard input:36:1 [make-string ... debug> down Frame 1 at standard input:36:14 [* 4 ...
Move n frames up the stack. For positive n, this advances toward the outermost frame, to higher frame numbers, to frames that have existed longer. n defaults to one.