Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / info / stabs / Cross-References.html
blob3813b7d66740c414beba51beeee4e3eff74d32c2
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="Cross-References">Cross-References</a>,
13 Next:<a rel="next" accesskey="n" href="Subranges.html#Subranges">Subranges</a>,
14 Previous:<a rel="previous" accesskey="p" href="Miscellaneous-Types.html#Miscellaneous%20Types">Miscellaneous Types</a>,
15 Up:<a rel="up" accesskey="u" href="Types.html#Types">Types</a>
16 <hr><br>
17 </div>
19 <h3 class="section">Cross-References to Other Types</h3>
21 <p>A type can be used before it is defined; one common way to deal with
22 that situation is just to use a type reference to a type which has not
23 yet been defined.
25 <p>Another way is with the <code>x</code> type descriptor, which is followed by
26 <code>s</code> for a structure tag, <code>u</code> for a union tag, or <code>e</code> for
27 a enumerator tag, followed by the name of the tag, followed by <code>:</code>.
28 If the name contains <code>::</code> between a <code>&lt;</code> and <code>&gt;</code> pair (for
29 C++ templates), such a <code>::</code> does not end the name--only a single
30 <code>:</code> ends the name; see <a href="Nested-Symbols.html#Nested%20Symbols">Nested Symbols</a>.
32 <p>For example, the following C declarations:
34 <pre class="example"> struct foo;
35 struct foo *bar;
36 </pre>
38 <p>produce:
40 <pre class="example"> .stabs "bar:G16=*17=xsfoo:",32,0,0,0
41 </pre>
43 <p>Not all debuggers support the <code>x</code> type descriptor, so on some
44 machines GCC does not use it. I believe that for the above example it
45 would just emit a reference to type 17 and never define it, but I
46 haven't verified that.
48 <p>Modula-2 imported types, at least on AIX, use the <code>i</code> type
49 descriptor, which is followed by the name of the module from which the
50 type is imported, followed by <code>:</code>, followed by the name of the
51 type. There is then optionally a comma followed by type information for
52 the type. This differs from merely naming the type (see <a href="Typedefs.html#Typedefs">Typedefs</a>) in
53 that it identifies the module; I don't understand whether the name of
54 the type given here is always just the same as the name we are giving
55 it, or whether this type descriptor is used with a nameless stab
56 (see <a href="String-Field.html#String%20Field">String Field</a>), or what. The symbol ends with <code>;</code>.
58 </body></html>