Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / info / stabs / Block-Structure.html
blobbb7571a4511504ca30addcc94e19c404b513d97c
1 <html lang="en">
2 <head>
3 <title>STABS</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="STABS">
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="Block%20Structure">Block Structure</a>,
13 Next:<a rel="next" accesskey="n" href="Alternate-Entry-Points.html#Alternate%20Entry%20Points">Alternate Entry Points</a>,
14 Previous:<a rel="previous" accesskey="p" href="Nested-Procedures.html#Nested%20Procedures">Nested Procedures</a>,
15 Up:<a rel="up" accesskey="u" href="Program-Structure.html#Program%20Structure">Program Structure</a>
16 <hr><br>
17 </div>
19 <h3 class="section">Block Structure</h3>
21 <p>The program's block structure is represented by the <code>N_LBRAC</code> (left
22 brace) and the <code>N_RBRAC</code> (right brace) stab types. The variables
23 defined inside a block precede the <code>N_LBRAC</code> symbol for most
24 compilers, including GCC. Other compilers, such as the Convex, Acorn
25 RISC machine, and Sun <code>acc</code> compilers, put the variables after the
26 <code>N_LBRAC</code> symbol. The values of the <code>N_LBRAC</code> and
27 <code>N_RBRAC</code> symbols are the start and end addresses of the code of
28 the block, respectively. For most machines, they are relative to the
29 starting address of this source file. For the Gould NP1, they are
30 absolute. For stabs in sections (see <a href="Stab-Sections.html#Stab%20Sections">Stab Sections</a>), they are
31 relative to the function in which they occur.
33 <p>The <code>N_LBRAC</code> and <code>N_RBRAC</code> stabs that describe the block
34 scope of a procedure are located after the <code>N_FUN</code> stab that
35 represents the procedure itself.
37 <p>Sun documents the desc field of <code>N_LBRAC</code> and
38 <code>N_RBRAC</code> symbols as containing the nesting level of the block.
39 However, dbx seems to not care, and GCC always sets desc to
40 zero.
42 <p>For XCOFF, block scope is indicated with <code>C_BLOCK</code> symbols. If the
43 name of the symbol is <code>.bb</code>, then it is the beginning of the block;
44 if the name of the symbol is <code>.be</code>; it is the end of the block.
46 </body></html>