source: trunk/third/gcc/dwarf.h @ 8834

Revision 8834, 9.8 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r8833, which included commits to RCS files with non-trunk default branches.
Line 
1/* Declarations and definitions of codes relating to the DWARF symbolic
2   debugging information format.
3
4   Written by Ron Guilmette (rfg@netcom.com)
5
6Copyright (C) 1992 Free Software Foundation, Inc.
7
8This file is part of GNU CC.
9
10GNU CC is free software; you can redistribute it and/or modify
11it under the terms of the GNU General Public License as published by
12the Free Software Foundation; either version 2, or (at your option)
13any later version.
14
15GNU CC is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with GNU CC; see the file COPYING.  If not, write to
22the Free Software Foundation, 59 Temple Place - Suite 330,
23Boston, MA 02111-1307, USA.  */
24
25/* This file is derived from the DWARF specification (a public document)
26   Revision 1.0.1 (April 8, 1992) developed by the UNIX International
27   Programming Languages Special Interest Group (UI/PLSIG) and distributed
28   by UNIX International.  Copies of this specification are available from
29   UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
30*/
31
32/* Tag names and codes.  */
33
34enum dwarf_tag {
35    TAG_padding                 = 0x0000,
36    TAG_array_type              = 0x0001,
37    TAG_class_type              = 0x0002,
38    TAG_entry_point             = 0x0003,
39    TAG_enumeration_type        = 0x0004,
40    TAG_formal_parameter        = 0x0005,
41    TAG_global_subroutine       = 0x0006,
42    TAG_global_variable         = 0x0007,
43                                /* 0x0008 -- reserved */
44                                /* 0x0009 -- reserved */
45    TAG_label                   = 0x000a,
46    TAG_lexical_block           = 0x000b,
47    TAG_local_variable          = 0x000c,
48    TAG_member                  = 0x000d,
49                                /* 0x000e -- reserved */
50    TAG_pointer_type            = 0x000f,
51    TAG_reference_type          = 0x0010,
52    TAG_compile_unit            = 0x0011,
53    TAG_string_type             = 0x0012,
54    TAG_structure_type          = 0x0013,
55    TAG_subroutine              = 0x0014,
56    TAG_subroutine_type         = 0x0015,
57    TAG_typedef                 = 0x0016,
58    TAG_union_type              = 0x0017,
59    TAG_unspecified_parameters  = 0x0018,
60    TAG_variant                 = 0x0019,
61    TAG_common_block            = 0x001a,
62    TAG_common_inclusion        = 0x001b,
63    TAG_inheritance             = 0x001c,
64    TAG_inlined_subroutine      = 0x001d,
65    TAG_module                  = 0x001e,
66    TAG_ptr_to_member_type      = 0x001f,
67    TAG_set_type                = 0x0020,
68    TAG_subrange_type           = 0x0021,
69    TAG_with_stmt               = 0x0022,
70
71    /* GNU extensions */
72
73    TAG_format_label            = 0x8000,  /* for FORTRAN 77 and Fortran 90 */
74    TAG_namelist                = 0x8001,  /* For Fortran 90 */
75    TAG_function_template       = 0x8002,  /* for C++ */
76    TAG_class_template          = 0x8003   /* for C++ */
77};
78
79#define TAG_lo_user     0x8000  /* implementation-defined range start */
80#define TAG_hi_user     0xffff  /* implementation-defined range end */
81#define TAG_source_file TAG_compile_unit  /* for backward compatibility */
82
83/* Form names and codes.  */
84
85enum dwarf_form {
86    FORM_ADDR   = 0x1,
87    FORM_REF    = 0x2,
88    FORM_BLOCK2 = 0x3,
89    FORM_BLOCK4 = 0x4,
90    FORM_DATA2  = 0x5,
91    FORM_DATA4  = 0x6,
92    FORM_DATA8  = 0x7,
93    FORM_STRING = 0x8
94};
95
96/* Attribute names and codes.  */
97
98enum dwarf_attribute {
99    AT_sibling                  = (0x0010|FORM_REF),
100    AT_location                 = (0x0020|FORM_BLOCK2),
101    AT_name                     = (0x0030|FORM_STRING),
102    AT_fund_type                = (0x0050|FORM_DATA2),
103    AT_mod_fund_type            = (0x0060|FORM_BLOCK2),
104    AT_user_def_type            = (0x0070|FORM_REF),
105    AT_mod_u_d_type             = (0x0080|FORM_BLOCK2),
106    AT_ordering                 = (0x0090|FORM_DATA2),
107    AT_subscr_data              = (0x00a0|FORM_BLOCK2),
108    AT_byte_size                = (0x00b0|FORM_DATA4),
109    AT_bit_offset               = (0x00c0|FORM_DATA2),
110    AT_bit_size                 = (0x00d0|FORM_DATA4),
111                                /* (0x00e0|FORM_xxxx) -- reserved */
112    AT_element_list             = (0x00f0|FORM_BLOCK4),
113    AT_stmt_list                = (0x0100|FORM_DATA4),
114    AT_low_pc                   = (0x0110|FORM_ADDR),
115    AT_high_pc                  = (0x0120|FORM_ADDR),
116    AT_language                 = (0x0130|FORM_DATA4),
117    AT_member                   = (0x0140|FORM_REF),
118    AT_discr                    = (0x0150|FORM_REF),
119    AT_discr_value              = (0x0160|FORM_BLOCK2),
120                                /* (0x0170|FORM_xxxx) -- reserved */
121                                /* (0x0180|FORM_xxxx) -- reserved */
122    AT_string_length            = (0x0190|FORM_BLOCK2),
123    AT_common_reference         = (0x01a0|FORM_REF),
124    AT_comp_dir                 = (0x01b0|FORM_STRING),
125        AT_const_value_string   = (0x01c0|FORM_STRING),
126        AT_const_value_data2    = (0x01c0|FORM_DATA2),
127        AT_const_value_data4    = (0x01c0|FORM_DATA4),
128        AT_const_value_data8    = (0x01c0|FORM_DATA8),
129        AT_const_value_block2   = (0x01c0|FORM_BLOCK2),
130        AT_const_value_block4   = (0x01c0|FORM_BLOCK4),
131    AT_containing_type          = (0x01d0|FORM_REF),
132        AT_default_value_addr   = (0x01e0|FORM_ADDR),
133        AT_default_value_data2  = (0x01e0|FORM_DATA2),
134        AT_default_value_data4  = (0x01e0|FORM_DATA4),
135        AT_default_value_data8  = (0x01e0|FORM_DATA8),
136        AT_default_value_string = (0x01e0|FORM_STRING),
137    AT_friends                  = (0x01f0|FORM_BLOCK2),
138    AT_inline                   = (0x0200|FORM_STRING),
139    AT_is_optional              = (0x0210|FORM_STRING),
140        AT_lower_bound_ref      = (0x0220|FORM_REF),
141        AT_lower_bound_data2    = (0x0220|FORM_DATA2),
142        AT_lower_bound_data4    = (0x0220|FORM_DATA4),
143        AT_lower_bound_data8    = (0x0220|FORM_DATA8),
144    AT_private                  = (0x0240|FORM_STRING),
145    AT_producer                 = (0x0250|FORM_STRING),
146    AT_program                  = (0x0230|FORM_STRING),
147    AT_protected                = (0x0260|FORM_STRING),
148    AT_prototyped               = (0x0270|FORM_STRING),
149    AT_public                   = (0x0280|FORM_STRING),
150    AT_pure_virtual             = (0x0290|FORM_STRING),
151    AT_return_addr              = (0x02a0|FORM_BLOCK2),
152    AT_abstract_origin          = (0x02b0|FORM_REF),
153    AT_start_scope              = (0x02c0|FORM_DATA4),
154    AT_stride_size              = (0x02e0|FORM_DATA4),
155        AT_upper_bound_ref      = (0x02f0|FORM_REF),
156        AT_upper_bound_data2    = (0x02f0|FORM_DATA2),
157        AT_upper_bound_data4    = (0x02f0|FORM_DATA4),
158        AT_upper_bound_data8    = (0x02f0|FORM_DATA8),
159    AT_virtual                  = (0x0300|FORM_STRING),
160
161    /* GNU extensions.  */
162
163    AT_sf_names                 = (0x8000|FORM_DATA4),
164    AT_src_info                 = (0x8010|FORM_DATA4),
165    AT_mac_info                 = (0x8020|FORM_DATA4),
166    AT_src_coords               = (0x8030|FORM_DATA4),
167    AT_body_begin               = (0x8040|FORM_ADDR),
168    AT_body_end                 = (0x8050|FORM_ADDR)
169};
170
171#define AT_lo_user      0x2000  /* implementation-defined range start */
172#define AT_hi_user      0x3ff0  /* implementation-defined range end */
173
174/* Location atom names and codes.  */
175
176enum dwarf_location_atom {
177    OP_REG      = 0x01,
178    OP_BASEREG  = 0x02,
179    OP_ADDR     = 0x03,
180    OP_CONST    = 0x04,
181    OP_DEREF2   = 0x05,
182    OP_DEREF4   = 0x06,
183    OP_ADD      = 0x07
184};
185
186#define OP_LO_USER      0x80  /* implementation-defined range start */
187#define OP_HI_USER      0xff  /* implementation-defined range end */
188
189/* Fundamental type names and codes.  */
190
191enum dwarf_fundamental_type {
192    FT_char             = 0x0001,
193    FT_signed_char      = 0x0002,
194    FT_unsigned_char    = 0x0003,
195    FT_short            = 0x0004,
196    FT_signed_short     = 0x0005,
197    FT_unsigned_short   = 0x0006,
198    FT_integer          = 0x0007,
199    FT_signed_integer   = 0x0008,
200    FT_unsigned_integer = 0x0009,
201    FT_long             = 0x000a,
202    FT_signed_long      = 0x000b,
203    FT_unsigned_long    = 0x000c,
204    FT_pointer          = 0x000d,  /* an alias for (void *) */
205    FT_float            = 0x000e,
206    FT_dbl_prec_float   = 0x000f,
207    FT_ext_prec_float   = 0x0010,  /* breaks "classic" svr4 SDB */
208    FT_complex          = 0x0011,  /* breaks "classic" svr4 SDB */
209    FT_dbl_prec_complex = 0x0012,  /* breaks "classic" svr4 SDB */
210                        /* 0x0013 -- reserved */
211    FT_void             = 0x0014,
212    FT_boolean          = 0x0015,  /* breaks "classic" svr4 SDB */
213    FT_ext_prec_complex = 0x0016,  /* breaks "classic" svr4 SDB */
214    FT_label            = 0x0017,
215 
216    /* GNU extensions
217       The low order byte must indicate the size (in bytes) for the type.
218       All of these types will probably break "classic" svr4 SDB */
219
220    FT_long_long        = 0x8008,
221    FT_signed_long_long = 0x8108,
222    FT_unsigned_long_long = 0x8208,
223
224    FT_int8             = 0x9001,
225    FT_signed_int8      = 0x9101,
226    FT_unsigned_int8    = 0x9201,
227    FT_int16            = 0x9302,
228    FT_signed_int16     = 0x9402,
229    FT_unsigned_int16   = 0x9502,
230    FT_int32            = 0x9604,
231    FT_signed_int32     = 0x9704,
232    FT_unsigned_int32   = 0x9804,
233    FT_int64            = 0x9908,
234    FT_signed_int64     = 0x9a08,
235    FT_unsigned_int64   = 0x9b08,
236
237    FT_real32           = 0xa004,
238    FT_real64           = 0xa108,
239    FT_real96           = 0xa20c,
240    FT_real128          = 0xa310
241};
242
243#define FT_lo_user      0x8000  /* implementation-defined range start */
244#define FT_hi_user      0xffff  /* implementation defined range end */
245
246/* Type modifier names and codes.  */
247
248enum dwarf_type_modifier {
249    MOD_pointer_to      = 0x01,
250    MOD_reference_to    = 0x02,
251    MOD_const           = 0x03,
252    MOD_volatile        = 0x04
253};
254
255#define MOD_lo_user     0x80  /* implementation-defined range start */
256#define MOD_hi_user     0xff  /* implementation-defined range end */
257
258/* Array ordering names and codes.  */
259
260enum dwarf_array_dim_ordering {
261    ORD_row_major       = 0,
262    ORD_col_major       = 1
263};
264
265/* Array subscript format names and codes.  */
266
267enum dwarf_subscr_data_formats {
268    FMT_FT_C_C  = 0x0,
269    FMT_FT_C_X  = 0x1,
270    FMT_FT_X_C  = 0x2,
271    FMT_FT_X_X  = 0x3,
272    FMT_UT_C_C  = 0x4,
273    FMT_UT_C_X  = 0x5,
274    FMT_UT_X_C  = 0x6,
275    FMT_UT_X_X  = 0x7,
276    FMT_ET      = 0x8
277};
278
279/* Derived from above for ease of use.  */
280
281#define FMT_CODE(_FUNDAMENTAL_TYPE_P, _UB_CONST_P, _LB_CONST_P) \
282 (((_FUNDAMENTAL_TYPE_P) ? 0 : 4)       \
283  | ((_UB_CONST_P) ? 0 : 2)             \
284  | ((_LB_CONST_P) ? 0 : 1))
285
286/* Source language names and codes.  */
287
288enum dwarf_source_language {
289    LANG_C89            = 0x00000001,
290    LANG_C              = 0x00000002,
291    LANG_ADA83          = 0x00000003,
292    LANG_C_PLUS_PLUS    = 0x00000004,
293    LANG_COBOL74        = 0x00000005,
294    LANG_COBOL85        = 0x00000006,
295    LANG_FORTRAN77      = 0x00000007,
296    LANG_FORTRAN90      = 0x00000008,
297    LANG_PASCAL83       = 0x00000009,
298    LANG_MODULA2        = 0x0000000a
299};
300
301#define LANG_lo_user    0x00008000  /* implementation-defined range start */
302#define LANG_hi_user    0x0000ffff  /* implementation-defined range end */
303
304/* Names and codes for GNU "macinfo" extension.  */
305
306enum dwarf_macinfo_record_type {
307    MACINFO_start       = 's',
308    MACINFO_resume      = 'r',
309    MACINFO_define      = 'd',
310    MACINFO_undef       = 'u'
311};
Note: See TracBrowser for help on using the repository browser.