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=
"Questions">Questions
</a>
16 <h2 class=
"appendix">Questions and Anomalies
</h2>
19 <li>For GNU C stabs defining local and global variables (
<code>N_LSYM
</code> and
20 <code>N_GSYM
</code>), the desc field is supposed to contain the source
21 line number on which the variable is defined. In reality the desc
22 field is always
0. (This behavior is defined in
<code>dbxout.c
</code> and
23 putting a line number in desc is controlled by
<code>#ifdef
24 WINNING_GDB
</code>, which defaults to false). GDB supposedly uses this
25 information if you say
<code>list
</code><var>var
</var><code></code>. In reality,
<var>var
</var> can
26 be a variable defined in the program and GDB says
<code>function
27 </code><var>var
</var><code> not defined
</code>.
29 <li>In GNU C stabs, there seems to be no way to differentiate tag types:
30 structures, unions, and enums (symbol descriptor
<code>T
</code>) and typedefs
31 (symbol descriptor
<code>t
</code>) defined at file scope from types defined locally
32 to a procedure or other more local scope. They all use the
<code>N_LSYM
</code>
33 stab type. Types defined at procedure scope are emitted after the
34 <code>N_RBRAC
</code> of the preceding function and before the code of the
35 procedure in which they are defined. This is exactly the same as
36 types defined in the source file between the two procedure bodies.
37 GDB over-compensates by placing all types in block #
1, the block for
38 symbols of file scope. This is true for default,
<code>-ansi
</code> and
39 <code>-traditional
</code> compiler options. (Bugs gcc/
1063, gdb/
1066.)
41 <li>What ends the procedure scope? Is it the proc block's
<code>N_RBRAC
</code> or the
42 next
<code>N_FUN
</code>? (I believe its the first.)