backtrace (gdb mode only)

Print a backtrace of stack frames.

Syntax

backtrace [full] [num]

Parameters

full

Instructs the debugger to print the values of the local variables.

num

The number of stack frames to print, starting from the most recent.

Description

This command prints a backtrace, which illustrates how your program arrived at its present position.

When you do not include any parameters, the debugger displays a backtrace of the entire call stack, for all frames in the stack, printing one line per frame.

To stop the backtrace, press the Pause key.

Example

The following example prints the last three frames in the call stack.

(idb) backtrace 3
#0  0x08051c7c in IntNode::printNodeData (this=0x805c500) at src/x_list.cxx:94
#1  0x0804af73 in List<Node>::print (this=0xbfffa330) at src/x_list.cxx:168
#2  0x08051a3c in main () at src/x_list.cxx:203

See Also


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.