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

Table Of Contents
The -stack-info-depth command
Synopsis
-stack-info-depth [ max-depth ]
Return the depth of the stack. If the integer argument max-depth is specified, do not
count beyond max-depth frames.
GDB command
There is no equivalent GDB command.
Example
For a stack with frame levels 0 through 11:
(gdb)
-stack-info-depth
^done,depth="12"
(gdb)
-stack-info-depth 4
^done,depth="4"
(gdb)
-stack-info-depth 12
^done,depth="12"
(gdb)
-stack-info-depth 11
^done,depth="11"
(gdb)
-stack-info-depth 13
^done,depth="12"
(gdb)
The -stack-list-arguments command
Synopsis
-stack-list-arguments show-values
[ low-frame high-frame ]
Display a list of the arguments for the frames between low-frame and high-frame
(inclusive). If low-frame and high-frame are not provided, list the arguments for the
whole call stack.
The show-values argument must have a value of 0 or 1. A value of 0 means that only
the names of the arguments are listed, a value of 1 means that both names and values
of the arguments are printed.
GDB command
GDB does not have an equivalent command. gdbtk has a 'gdb_get_args' command
which partially overlaps with the functionality of '-stack-list-arguments'.
21.9 GDB/MI Stack Manipulation Commands 341