DeBUG
with GDB
<< CONTENTS
>>
STACK MAN PAGES
STACK
Examining
the stack
The
stack is made up of stack frames. Gdb assigns numbers to stack
frames
counting from zero for the innermost (currently executing) frame.
At any
time gdb identifies one frame as the "selected" frame.
Variable lookups are done with respect to the selected frame.
When
the program being debugged stops, gdb selects the innermost frame.
The
commands below can be used to select other frames by number or address.
COMMANDS
abort_call
ba
bac
backtrace
bt
down
frame
return
select-frame
up
abort_call
Abort
gdb command line call.
ba
Print
backtrace of all stack frames, or innermost COUNT frames.
With a
negative argument, print outermost -COUNT frames.
Use of
the 'full' qualifier also prints the values of the local variables
bac
Print
backtrace of all stack frames, or innermost COUNT frames.
With a
negative argument, print outermost -COUNT frames.
Use of
the 'full' qualifier also prints the values of the local variables.
backtrace
Print
backtrace of all stack frames, or innermost COUNT frames.
With a
negative argument, print outermost -COUNT frames.
Use of
the 'full' qualifier also prints the values of the local variables.
bt
Print
backtrace of all stack frames, or innermost COUNT frames.
With a
negative argument, print outermost -COUNT frames.
Use of
the 'full' qualifier also prints the values of the local variables.
down
Select
and print stack frame called by this one.
An
argument says how many frames down to go.
frame
Select
and print a stack frame.
With no
argument, print the selected stack frame. (See also "info frame").
An
argument specifies the frame to select.
It can
be a stack frame number or the address of the frame.
With
argument, nothing is printed if input is coming from
a
command file or a user-defined command.
return
Make
selected stack frame return to its caller.
Control
remains in the debugger, but when you continue
execution will resume in the frame above the one now selected.
If an
argument is given, it is an expression for the value to return.
select-frame
Select
a stack frame without printing anything.
An
argument specifies the frame to select.
It can
be a stack frame number or the address of the frame.
up
Select
and print stack frame that called this one.
An
argument says how many frames up to go.
HELP STACK
Muthukumar Kandasamy <[email protected]>