Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
'level' The frame number, 0 being the topmost frame, that is the innermost function.
'addr' The $pc value for that frame.
'func' Function name.
'file' File name of the source file where the function lives.
'line' Line number corresponding to the $pc.
If invoked without arguments, this command prints a backtrace for the whole stack. If
given two integer arguments, it shows the frames whose levels are between the two
arguments (inclusive). If the two arguments are equal, it shows the single frame at the
corresponding level.
GDB command
The corresponding GDB commands are 'backtrace' and 'where'.
Example
Full stack backtrace:
(gdb)
-stack-list-frames
^done,stack=
[frame={level="0 ",addr="0x0001076c",func="foo",
file="recursive2.c",line="11"},
frame={level="1 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"},
frame={level="2 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"},
frame={level="3 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"},
frame={level="4 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"},
frame={level="5 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"},
frame={level="6 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"},
frame={level="7 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"},
frame={level="8 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"},
frame={level="9 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"},
frame={level="10",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"},
frame={level="11",addr="0x00010738",func="main",
file="recursive2.c",line="4"}]
(gdb)
Show frames between low_frame and high_frame:
21.9 GDB/MI Stack Manipulation Commands 343