manpagez: man pages & more
info gdb
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. Examining the Stack

When your program has stopped, the first thing you need to know is where it stopped and how it got there.

Each time your program performs a function call, information about the call is generated. That information includes the location of the call in your program, the arguments of the call, and the local variables of the function being called. The information is saved in a block of data called a stack frame. The stack frames are allocated in a region of memory called the call stack.

When your program stops, the No value for GDBN commands for examining the stack allow you to see all of this information.

One of the stack frames is selected by No value for GDBN and many No value for GDBN commands refer implicitly to the selected frame. In particular, whenever you ask No value for GDBN for the value of a variable in your program, the value is found in the selected frame. There are special No value for GDBN commands to select whichever frame you are interested in. See section Selecting a Frame.

When your program stops, No value for GDBN automatically selects the currently executing frame and describes it briefly, similar to the frame command (see section Information about a Frame).

© 2000-2017
Individual documents may contain additional copyright information.