info stack (gdb mode only)

Print a backtrace of stack frames.

Syntax

info stack [num]

Parameters

num

The number of stack frames to print, starting from the current position.

Description

This command prints a backtrace of stack frames. This command is similar to backtrace.

When you specify num, this command prints the current frame, which is the frame that has debugger focus, and the num-1 callers of the current frame.

When you do not specify num, this command prints all the frames in the call stack.

For example, if you enter info stack 3, the debugger prints the current frame, its caller, and the caller of the caller.

The up command puts focus on the caller of the current frame.

Example

The following example shows an entire call stack, consisting of two frames.

(idb)  info stack
#0  0x08048537 in foo (j=10) at /site/c_code/other_glob.c:6
#1  0x0804844c in main () at /site/c_code/hello.c:22
(idb) 

See Also


Submit feedback on this help topic

Copyright © 2001-2011, Intel Corporation. All rights reserved.