Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / info / stabs / Basic-Cplusplus-Types.html
blob490262494fa7bfa0957990b911c536067d66af4c
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="Basic%20Cplusplus%20Types">Basic Cplusplus Types</a>,
13 Next:<a rel="next" accesskey="n" href="Simple-Classes.html#Simple%20Classes">Simple Classes</a>,
14 Previous:<a rel="previous" accesskey="p" href="Nested-Symbols.html#Nested%20Symbols">Nested Symbols</a>,
15 Up:<a rel="up" accesskey="u" href="Cplusplus.html#Cplusplus">Cplusplus</a>
16 <hr><br>
17 </div>
19 <h3 class="section">Basic Types For C++</h3>
21 <p>&lt;&lt; the examples that follow are based on a01.C &gt;&gt;
23 <p>C++ adds two more builtin types to the set defined for C. These are
24 the unknown type and the vtable record type. The unknown type, type
25 16, is defined in terms of itself like the void type.
27 <p>The vtable record type, type 17, is defined as a structure type and
28 then as a structure tag. The structure has four fields: delta, index,
29 pfn, and delta2. pfn is the function pointer.
31 <p>&lt;&lt; In boilerplate $vtbl_ptr_type, what are the fields delta,
32 index, and delta2 used for? &gt;&gt;
34 <p>This basic type is present in all C++ programs even if there are no
35 virtual methods defined.
37 <pre class="display"> .stabs "struct_name:sym_desc(type)type_def(17)=type_desc(struct)struct_bytes(8)
38 elem_name(delta):type_ref(short int),bit_offset(0),field_bits(16);
39 elem_name(index):type_ref(short int),bit_offset(16),field_bits(16);
40 elem_name(pfn):type_def(18)=type_desc(ptr to)type_ref(void),
41 bit_offset(32),field_bits(32);
42 elem_name(delta2):type_def(short int);bit_offset(32),field_bits(16);;"
43 N_LSYM, NIL, NIL
44 </pre>
46 <pre class="smallexample"> .stabs "$vtbl_ptr_type:t17=s8
47 delta:6,0,16;index:6,16,16;pfn:18=*15,32,32;delta2:6,32,16;;"
48 ,128,0,0,0
49 </pre>
51 <pre class="display"> .stabs "name:sym_dec(struct tag)type_ref($vtbl_ptr_type)",N_LSYM,NIL,NIL,NIL
52 </pre>
54 <pre class="example"> .stabs "$vtbl_ptr_type:T17",128,0,0,0
55 </pre>
57 </body></html>