Name

frame

Synopsis

frame
frame frame-numframeaddress

Select or print information about the current stack frame (function invocation). Frame zero is the innermost (most recent) stack frame. With no arguments, print the current stack frame. With a frame-num, move to that frame. This is the most common kind of argument. An address argument may be used to select the frame at the given address. This is necessary if the chaining of stack frames has been damaged by a bug. Some architectures may require more than one address.

Example

Move up the call stack toward an older function:

    (gdb) where
    #0  do_print (tree=0x83579e0) at builtin.c:1573
    #1  0x08087bef in interpret (tree=0x83579e0) at eval.c:784
    #2  0x08086b68 in interpret (tree=0x8357980) at eval.c:453
    #3  0x08072804 in main (argc=2, argv=0xbfeb8584) at main.c:584
    (gdb) frame 2
    #2  0x08086b68 in interpret (tree=0x8357980) at eval.c:453
    453                       (void) interpret(tree->rnode);

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.