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">
12 Node:
<a name=
"Nested%20Procedures">Nested Procedures
</a>,
13 Next:
<a rel=
"next" accesskey=
"n" href=
"Block-Structure.html#Block%20Structure">Block Structure
</a>,
14 Previous:
<a rel=
"previous" accesskey=
"p" href=
"Procedures.html#Procedures">Procedures
</a>,
15 Up:
<a rel=
"up" accesskey=
"u" href=
"Program-Structure.html#Program%20Structure">Program Structure
</a>
19 <h3 class=
"section">Nested Procedures
</h3>
21 <p>For any of the symbol descriptors representing procedures, after the
22 symbol descriptor and the type information is optionally a scope
23 specifier. This consists of a comma, the name of the procedure, another
24 comma, and the name of the enclosing procedure. The first name is local
25 to the scope specified, and seems to be redundant with the name of the
26 symbol (before the
<code>:
</code>). This feature is used by GCC, and
27 presumably Pascal, Modula-
2, etc., compilers, for nested functions.
29 <p>If procedures are nested more than one level deep, only the immediately
30 containing scope is specified. For example, this code:
32 <pre class=
"example"> int
41 return baz (x +
2 * y);
43 return x + bar (
3 * x);
47 <p>produces the stabs:
49 <pre class=
"example"> .stabs
"baz:f1,baz,bar",
36,
0,
0,_baz
.15 #
36 is N_FUN
50 .stabs
"bar:f1,bar,foo",
36,
0,
0,_bar
.12
51 .stabs
"foo:F1",
36,
0,
0,_foo