1 /* Declarations and definitions of codes relating to the DWARF symbolic
2 debugging information format.
4 Written by Ron Guilmette (rfg@ncd.com)
6 Copyright 1992, 1993, 1995, 1999 Free Software Foundation, Inc.
8 This file is part of GNU CC.
10 GNU CC is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
15 GNU CC is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with GNU CC; see the file COPYING. If not, write to
22 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 /* This file is derived from the DWARF specification (a public document)
25 Revision 1.0.1 (April 8, 1992) developed by the UNIX International
26 Programming Languages Special Interest Group (UI/PLSIG) and distributed
27 by UNIX International. Copies of this specification are available from
28 UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
34 /* Tag names and codes. */
38 TAG_array_type
= 0x0001,
39 TAG_class_type
= 0x0002,
40 TAG_entry_point
= 0x0003,
41 TAG_enumeration_type
= 0x0004,
42 TAG_formal_parameter
= 0x0005,
43 TAG_global_subroutine
= 0x0006,
44 TAG_global_variable
= 0x0007,
45 /* 0x0008 -- reserved */
46 /* 0x0009 -- reserved */
48 TAG_lexical_block
= 0x000b,
49 TAG_local_variable
= 0x000c,
51 /* 0x000e -- reserved */
52 TAG_pointer_type
= 0x000f,
53 TAG_reference_type
= 0x0010,
54 TAG_compile_unit
= 0x0011,
55 TAG_string_type
= 0x0012,
56 TAG_structure_type
= 0x0013,
57 TAG_subroutine
= 0x0014,
58 TAG_subroutine_type
= 0x0015,
60 TAG_union_type
= 0x0017,
61 TAG_unspecified_parameters
= 0x0018,
63 TAG_common_block
= 0x001a,
64 TAG_common_inclusion
= 0x001b,
65 TAG_inheritance
= 0x001c,
66 TAG_inlined_subroutine
= 0x001d,
68 TAG_ptr_to_member_type
= 0x001f,
69 TAG_set_type
= 0x0020,
70 TAG_subrange_type
= 0x0021,
71 TAG_with_stmt
= 0x0022,
75 TAG_format_label
= 0x8000, /* for FORTRAN 77 and Fortran 90 */
76 TAG_namelist
= 0x8001, /* For Fortran 90 */
77 TAG_function_template
= 0x8002, /* for C++ */
78 TAG_class_template
= 0x8003 /* for C++ */
81 #define TAG_lo_user 0x8000 /* implementation-defined range start */
82 #define TAG_hi_user 0xffff /* implementation-defined range end */
83 #define TAG_source_file TAG_compile_unit /* for backward compatibility */
85 /* Form names and codes. */
98 /* Attribute names and codes. */
100 enum dwarf_attribute
{
101 AT_sibling
= (0x0010|FORM_REF
),
102 AT_location
= (0x0020|FORM_BLOCK2
),
103 AT_name
= (0x0030|FORM_STRING
),
104 AT_fund_type
= (0x0050|FORM_DATA2
),
105 AT_mod_fund_type
= (0x0060|FORM_BLOCK2
),
106 AT_user_def_type
= (0x0070|FORM_REF
),
107 AT_mod_u_d_type
= (0x0080|FORM_BLOCK2
),
108 AT_ordering
= (0x0090|FORM_DATA2
),
109 AT_subscr_data
= (0x00a0|FORM_BLOCK2
),
110 AT_byte_size
= (0x00b0|FORM_DATA4
),
111 AT_bit_offset
= (0x00c0|FORM_DATA2
),
112 AT_bit_size
= (0x00d0|FORM_DATA4
),
113 /* (0x00e0|FORM_xxxx) -- reserved */
114 AT_element_list
= (0x00f0|FORM_BLOCK4
),
115 AT_stmt_list
= (0x0100|FORM_DATA4
),
116 AT_low_pc
= (0x0110|FORM_ADDR
),
117 AT_high_pc
= (0x0120|FORM_ADDR
),
118 AT_language
= (0x0130|FORM_DATA4
),
119 AT_member
= (0x0140|FORM_REF
),
120 AT_discr
= (0x0150|FORM_REF
),
121 AT_discr_value
= (0x0160|FORM_BLOCK2
),
122 /* (0x0170|FORM_xxxx) -- reserved */
123 /* (0x0180|FORM_xxxx) -- reserved */
124 AT_string_length
= (0x0190|FORM_BLOCK2
),
125 AT_common_reference
= (0x01a0|FORM_REF
),
126 AT_comp_dir
= (0x01b0|FORM_STRING
),
127 AT_const_value_string
= (0x01c0|FORM_STRING
),
128 AT_const_value_data2
= (0x01c0|FORM_DATA2
),
129 AT_const_value_data4
= (0x01c0|FORM_DATA4
),
130 AT_const_value_data8
= (0x01c0|FORM_DATA8
),
131 AT_const_value_block2
= (0x01c0|FORM_BLOCK2
),
132 AT_const_value_block4
= (0x01c0|FORM_BLOCK4
),
133 AT_containing_type
= (0x01d0|FORM_REF
),
134 AT_default_value_addr
= (0x01e0|FORM_ADDR
),
135 AT_default_value_data2
= (0x01e0|FORM_DATA2
),
136 AT_default_value_data4
= (0x01e0|FORM_DATA4
),
137 AT_default_value_data8
= (0x01e0|FORM_DATA8
),
138 AT_default_value_string
= (0x01e0|FORM_STRING
),
139 AT_friends
= (0x01f0|FORM_BLOCK2
),
140 AT_inline
= (0x0200|FORM_STRING
),
141 AT_is_optional
= (0x0210|FORM_STRING
),
142 AT_lower_bound_ref
= (0x0220|FORM_REF
),
143 AT_lower_bound_data2
= (0x0220|FORM_DATA2
),
144 AT_lower_bound_data4
= (0x0220|FORM_DATA4
),
145 AT_lower_bound_data8
= (0x0220|FORM_DATA8
),
146 AT_private
= (0x0240|FORM_STRING
),
147 AT_producer
= (0x0250|FORM_STRING
),
148 AT_program
= (0x0230|FORM_STRING
),
149 AT_protected
= (0x0260|FORM_STRING
),
150 AT_prototyped
= (0x0270|FORM_STRING
),
151 AT_public
= (0x0280|FORM_STRING
),
152 AT_pure_virtual
= (0x0290|FORM_STRING
),
153 AT_return_addr
= (0x02a0|FORM_BLOCK2
),
154 AT_abstract_origin
= (0x02b0|FORM_REF
),
155 AT_start_scope
= (0x02c0|FORM_DATA4
),
156 AT_stride_size
= (0x02e0|FORM_DATA4
),
157 AT_upper_bound_ref
= (0x02f0|FORM_REF
),
158 AT_upper_bound_data2
= (0x02f0|FORM_DATA2
),
159 AT_upper_bound_data4
= (0x02f0|FORM_DATA4
),
160 AT_upper_bound_data8
= (0x02f0|FORM_DATA8
),
161 AT_virtual
= (0x0300|FORM_STRING
),
163 /* GNU extensions. */
165 AT_sf_names
= (0x8000|FORM_DATA4
),
166 AT_src_info
= (0x8010|FORM_DATA4
),
167 AT_mac_info
= (0x8020|FORM_DATA4
),
168 AT_src_coords
= (0x8030|FORM_DATA4
),
169 AT_body_begin
= (0x8040|FORM_ADDR
),
170 AT_body_end
= (0x8050|FORM_ADDR
)
173 #define AT_lo_user 0x8000 /* implementation-defined range start */
174 #define AT_hi_user 0xffff /* implementation-defined range end */
176 /* Location atom names and codes. */
178 enum dwarf_location_atom
{
188 #define OP_LO_USER 0x80 /* implementation-defined range start */
189 #define OP_HI_USER 0xff /* implementation-defined range end */
191 /* Fundamental type names and codes. */
193 enum dwarf_fundamental_type
{
195 FT_signed_char
= 0x0002,
196 FT_unsigned_char
= 0x0003,
198 FT_signed_short
= 0x0005,
199 FT_unsigned_short
= 0x0006,
201 FT_signed_integer
= 0x0008,
202 FT_unsigned_integer
= 0x0009,
204 FT_signed_long
= 0x000b,
205 FT_unsigned_long
= 0x000c,
206 FT_pointer
= 0x000d, /* an alias for (void *) */
208 FT_dbl_prec_float
= 0x000f,
209 FT_ext_prec_float
= 0x0010, /* breaks "classic" svr4 SDB */
210 FT_complex
= 0x0011, /* breaks "classic" svr4 SDB */
211 FT_dbl_prec_complex
= 0x0012, /* breaks "classic" svr4 SDB */
212 /* 0x0013 -- reserved */
214 FT_boolean
= 0x0015, /* breaks "classic" svr4 SDB */
215 FT_ext_prec_complex
= 0x0016, /* breaks "classic" svr4 SDB */
219 The low order byte must indicate the size (in bytes) for the type.
220 All of these types will probably break "classic" svr4 SDB */
222 FT_long_long
= 0x8008,
223 FT_signed_long_long
= 0x8108,
224 FT_unsigned_long_long
= 0x8208,
227 FT_signed_int8
= 0x9101,
228 FT_unsigned_int8
= 0x9201,
230 FT_signed_int16
= 0x9402,
231 FT_unsigned_int16
= 0x9502,
233 FT_signed_int32
= 0x9704,
234 FT_unsigned_int32
= 0x9804,
236 FT_signed_int64
= 0x9a08,
237 FT_unsigned_int64
= 0x9b08,
245 #define FT_lo_user 0x8000 /* implementation-defined range start */
246 #define FT_hi_user 0xffff /* implementation defined range end */
248 /* Type modifier names and codes. */
250 enum dwarf_type_modifier
{
251 MOD_pointer_to
= 0x01,
252 MOD_reference_to
= 0x02,
257 #define MOD_lo_user 0x80 /* implementation-defined range start */
258 #define MOD_hi_user 0xff /* implementation-defined range end */
260 /* Array ordering names and codes. */
262 enum dwarf_array_dim_ordering
{
267 /* Array subscript format names and codes. */
269 enum dwarf_subscr_data_formats
{
281 /* Derived from above for ease of use. */
283 #define FMT_CODE(_FUNDAMENTAL_TYPE_P, _UB_CONST_P, _LB_CONST_P) \
284 (((_FUNDAMENTAL_TYPE_P) ? 0 : 4) \
285 | ((_UB_CONST_P) ? 0 : 2) \
286 | ((_LB_CONST_P) ? 0 : 1))
288 /* Source language names and codes. */
290 enum dwarf_source_language
{
291 LANG_C89
= 0x00000001,
293 LANG_ADA83
= 0x00000003,
294 LANG_C_PLUS_PLUS
= 0x00000004,
295 LANG_COBOL74
= 0x00000005,
296 LANG_COBOL85
= 0x00000006,
297 LANG_FORTRAN77
= 0x00000007,
298 LANG_FORTRAN90
= 0x00000008,
299 LANG_PASCAL83
= 0x00000009,
300 LANG_MODULA2
= 0x0000000a,
304 LANG_CHILL
= 0x00009af3, /* random value for GNU Chill */
305 LANG_JAVA
= 0x00009af4 /* random value + 1 for GNU Java */
308 #define LANG_lo_user 0x00008000 /* implementation-defined range start */
309 #define LANG_hi_user 0x0000ffff /* implementation-defined range end */
311 /* Names and codes for GNU "macinfo" extension. */
313 enum dwarf_macinfo_record_type
{
315 MACINFO_resume
= 'r',
316 MACINFO_define
= 'd',
320 #endif /* _ELF_DWARF_H */