Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / info / stabs / Transformations-On-Global-Variables.html
blob90b330821ba6281492eb6a651dcd5786aaf75531
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="Transformations%20On%20Global%20Variables">Transformations On Global Variables</a>,
13 Next:<a rel="next" accesskey="n" href="Stab-Section-Transformations.html#Stab%20Section%20Transformations">Stab Section Transformations</a>,
14 Previous:<a rel="previous" accesskey="p" href="Transformations-On-Static-Variables.html#Transformations%20On%20Static%20Variables">Transformations On Static Variables</a>,
15 Up:<a rel="up" accesskey="u" href="Transformations-On-Symbol-Tables.html#Transformations%20On%20Symbol%20Tables">Transformations On Symbol Tables</a>
16 <hr><br>
17 </div>
19 <h4 class="subsection">Transformations on Global Variables</h4>
21 <p>Stabs for global variables do not contain location information. In
22 this case, the debugger finds location information in the assembler or
23 linker symbol table entry describing the variable. The source line:
25 <pre class="example"> char g_foo = 'c';
26 </pre>
28 <p>generates the stab:
30 <pre class="example"> .stabs "g_foo:G2",32,0,0,0
31 </pre>
33 <p>The variable is represented by two symbol table entries in the object
34 file (see below). The first one originated as a stab. The second one
35 is an external symbol. The upper case <code>D</code> signifies that the
36 <code>n_type</code> field of the symbol table contains 7, <code>N_DATA</code> with
37 local linkage. The stab's value is zero since the value is not used for
38 <code>N_GSYM</code> stabs. The value of the linker symbol is the relocatable
39 address corresponding to the variable.
41 <pre class="example"> 00000000 - 00 0000 GSYM g_foo:G2
42 00000080 D _g_foo
43 </pre>
45 <p>These entries as transformed by the linker. The linker symbol table
46 entry now holds an absolute address:
48 <pre class="example"> 00000000 - 00 0000 GSYM g_foo:G2
49 ...
50 0000e008 D _g_foo
51 </pre>
53 </body></html>