Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / info / gdb / Stack.html
blobc36ce9e92aa08c7eb71e1ab46bcf86f1fe0a3610
1 <html lang="en">
2 <head>
3 <title>Debugging with GDB</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="Debugging with GDB">
6 <meta name="generator" content="makeinfo 4.3">
7 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="Stack">Stack</a>,
13 Next:<a rel="next" accesskey="n" href="Source.html#Source">Source</a>,
14 Previous:<a rel="previous" accesskey="p" href="Stopping.html#Stopping">Stopping</a>,
15 Up:<a rel="up" accesskey="u" href="index.html#Top">Top</a>
16 <hr><br>
17 </div>
19 <h2 class="chapter">Examining the Stack</h2>
21 <p>When your program has stopped, the first thing you need to know is where it
22 stopped and how it got there.
24 <p>Each time your program performs a function call, information about the call
25 is generated.
26 That information includes the location of the call in your program,
27 the arguments of the call,
28 and the local variables of the function being called.
29 The information is saved in a block of data called a <dfn>stack frame</dfn>.
30 The stack frames are allocated in a region of memory called the <dfn>call
31 stack</dfn>.
33 <p>When your program stops, the GDB commands for examining the
34 stack allow you to see all of this information.
36 <p>One of the stack frames is <dfn>selected</dfn> by GDB and many
37 GDB commands refer implicitly to the selected frame. In
38 particular, whenever you ask GDB for the value of a variable in
39 your program, the value is found in the selected frame. There are
40 special GDB commands to select whichever frame you are
41 interested in. See <a href="Selection.html#Selection">Selecting a frame</a>.
43 <p>When your program stops, GDB automatically selects the
44 currently executing frame and describes it briefly, similar to the
45 <code>frame</code> command (see <a href="Frame-Info.html#Frame%20Info">Information about a frame</a>).
47 <ul class="menu">
48 <li><a accesskey="1" href="Frames.html#Frames">Frames</a>: Stack frames
49 <li><a accesskey="2" href="Backtrace.html#Backtrace">Backtrace</a>: Backtraces
50 <li><a accesskey="3" href="Selection.html#Selection">Selection</a>: Selecting a frame
51 <li><a accesskey="4" href="Frame-Info.html#Frame%20Info">Frame Info</a>: Information on a frame
53 </ul>
55 </body></html>