3 This file is derived from the DWARF specification, Draft 3 by the UNIX
4 International Programming Languages Special Interest Group dated 6/5/91.
6 Updated to Draft 4 dated 7/31/91.
8 (Extracted from GCC 2.0, snapshot 267 and placed in Cygnus include
9 tree on 9/28/91 by Fred Fish, as part of gdb SVR4 DWARF support.)
12 /* Tag names: 4.1 Debugging Information Entry, figure 9. */
14 #define TAG_padding 0x0000
15 #define TAG_array_type 0x0001
16 #define TAG_class_type 0x0002
17 #define TAG_entry_point 0x0003
18 #define TAG_enumeration_type 0x0004
19 #define TAG_formal_parameter 0x0005
20 #define TAG_global_subroutine 0x0006
21 #define TAG_global_variable 0x0007
22 #define TAG_imported_declaration 0x0008
23 #define TAG_inline_subroutine 0x0009
24 #define TAG_label 0x000a
25 #define TAG_lexical_block 0x000b
26 #define TAG_local_variable 0x000c
27 #define TAG_member 0x000d
28 #define TAG_member_function 0x000e
29 #define TAG_pointer_type 0x000f
30 #define TAG_reference_type 0x0010
31 #define TAG_compile_unit 0x0011
32 #define TAG_source_file 0x0011
33 #define TAG_string_type 0x0012
34 #define TAG_structure_type 0x0013
35 #define TAG_subroutine 0x0014
36 #define TAG_subroutine_type 0x0015
37 #define TAG_typedef 0x0016
38 #define TAG_union_type 0x0017
39 #define TAG_unspecified_parameters 0x0018
40 #define TAG_variant 0x0019
42 /* Mysterious gap introduced in draft 4! */
43 #define TAG_format 0x0020
44 #define TAG_with_stmt 0x0021
45 #define TAG_set_type 0x0022
48 #define TAG_file_type 0x8000
50 #define TAG_lo_user 0x8000
51 #define TAG_hi_user 0xffff
53 /* Form names: 4.2 Attributes Types, figure 10. */
57 #define FORM_BLOCK2 0x3
58 #define FORM_BLOCK4 0x4
59 #define FORM_DATA2 0x5
60 #define FORM_DATA4 0x6
61 #define FORM_DATA8 0x7
62 #define FORM_STRING 0x8
64 /* Attribute form encodings: 4.2 Attributes Types, figure 11.
66 Attribute name Form Value
69 #define AT_sibling /* reference */ (0x0010|FORM_REF)
70 #define AT_location /* block2 */ (0x0020|FORM_BLOCK2)
71 #define AT_name /* string */ (0x0030|FORM_STRING)
72 #define AT_fund_type /* halfword */ (0x0050|FORM_DATA2)
73 #define AT_mod_fund_type /* block2 */ (0x0060|FORM_BLOCK2)
74 #define AT_user_def_type /* reference */ (0x0070|FORM_REF)
75 #define AT_mod_u_d_type /* block2 */ (0x0080|FORM_BLOCK2)
76 #define AT_ordering /* halfword */ (0x0090|FORM_DATA2)
77 #define AT_subscr_data /* block2 */ (0x00a0|FORM_BLOCK2)
78 #define AT_byte_size /* word */ (0x00b0|FORM_DATA4)
79 #define AT_bit_offset /* halfword */ (0x00c0|FORM_DATA2)
80 #define AT_bit_size /* word */ (0x00d0|FORM_DATA4)
81 #define AT_deriv_list /* block2 */ (0x00e0|FORM_BLOCK2)
82 #define AT_element_list /* block4 */ (0x00f0|FORM_BLOCK4)
83 #define AT_stmt_list /* word */ (0x0100|FORM_DATA4)
84 #define AT_low_pc /* address */ (0x0110|FORM_ADDR)
85 #define AT_high_pc /* address */ (0x0120|FORM_ADDR)
86 #define AT_language /* word */ (0x0130|FORM_DATA4)
87 #define AT_member /* reference */ (0x0140|FORM_REF)
88 #define AT_discr /* reference */ (0x0150|FORM_REF)
89 #define AT_discr_value /* block2 */ (0x0160|FORM_BLOCK2)
90 #define AT_visibility /* halfword */ (0x0170|FORM_DATA2)
91 #define AT_import /* reference */ (0x0180|FORM_REF)
92 #define AT_string_length /* block2 */ (0x0190|FORM_BLOCK2)
93 #define AT_comp_dir /* string */ (0x01a0|FORM_STRING)
94 #define AT_producer /* string */ (0x01b0|FORM_STRING)
96 /* Added in draft 4. */
97 #define AT_loclist /* word */ (0x01c0|FORM_DATA4)
98 #define AT_frame_base /* word */ (0x01d0|FORM_DATA4)
99 #define AT_incomplete /* halfword */ (0x01e0|FORM_DATA2)
100 #define AT_start_scope /* word */ (0x01f0|FORM_DATA4)
101 #define AT_stride_size /* word */ (0x0200|FORM_DATA4)
104 #define AT_src_info /* word */ (0x8010|FORM_DATA4)
105 #define AT_prototyped /* halfword */ (0x8020|FORM_DATA2)
106 #define AT_const_data /* block4 */ (0x8030|FORM_BLOCK4)
107 #define AT_is_external /* halfword */ (0x8040|FORM_DATA2)
109 #define AT_lo_user /* - */ 0x8000
110 #define AT_hi_user /* - */ 0xffff
112 /* Atom names: 4.5 Location Atoms, figure 12. */
115 #define OP_BASEREG 0x02
117 #define OP_CONST 0x04
118 #define OP_DEREF2 0x05
119 #define OP_DEREF4 0x06
122 #define OP_LO_USER 0x80
123 #define OP_HI_USER 0xff
125 /* Type names: 4.6 Fundamental Types, figure 13. */
127 #define FT_char 0x0001
128 #define FT_signed_char 0x0002
129 #define FT_unsigned_char 0x0003
130 #define FT_short 0x0004
131 #define FT_signed_short 0x0005
132 #define FT_unsigned_short 0x0006
133 #define FT_integer 0x0007
134 #define FT_signed_integer 0x0008
135 #define FT_unsigned_integer 0x0009
136 #define FT_long 0x000a
137 #define FT_signed_long 0x000b
138 #define FT_unsigned_long 0x000c
139 #define FT_pointer 0x000d
140 #define FT_float 0x000e
141 #define FT_dbl_prec_float 0x000f
142 #define FT_ext_prec_float 0x0010
143 #define FT_complex 0x0011
144 #define FT_dbl_prec_complex 0x0012
145 #define FT_boolean 0x0013 /* Disputed value; added in draft 4. */
146 #define FT_void 0x0014
148 /* GNU-specific fundamental type codes. */
149 #define FT_long_long 0x8000
150 #define FT_signed_long_long 0x8001
151 #define FT_unsigned_long_long 0x8002
153 #define FT_lo_user 0x8000
154 #define FT_hi_user 0xffff
156 /* Type modifier names: 4.7 Type Modifiers, figure 14. */
158 #define MOD_pointer_to 0x01
159 #define MOD_reference_to 0x02
161 #define MOD_const 0x03
162 #define MOD_volatile 0x04
164 #define MOD_lo_user 0x80
165 #define MOD_hi_user 0xff
167 /* Visibility names: 4.8 Visibility Entries, figure 15. */
169 #define VIS_local 0x00
170 #define VIS_exported 0x01
172 #define VIS_lo_user 0x80
173 #define VIS_hi_user 0xff
175 /* Ordering names: 4.9.1 Array Ordering, figure 16. */
177 #define ORD_row_major 0
178 #define ORD_col_major 1
180 /* Format names: 4.9.2 Array Subscripts, figure 17. */
182 #define FMT_FT_C_C 0x0
183 #define FMT_FT_C_X 0x1
184 #define FMT_FT_X_C 0x2
185 #define FMT_FT_X_X 0x3
186 #define FMT_UT_C_C 0x4
187 #define FMT_UT_C_X 0x5
188 #define FMT_UT_X_C 0x6
189 #define FMT_UT_X_X 0x7
192 /* Derived from above for ease of use. */
194 #define FMT_CODE(_FUNDAMENTAL_TYPE_P, _UB_CONST_P, _LB_CONST_P) \
195 (((_FUNDAMENTAL_TYPE_P) ? 0 : 4) \
196 | ((_UB_CONST_P) ? 0 : 2) \
197 | ((_LB_CONST_P) ? 0 : 1))
199 /* Language names: 4.13 Source Languages, figure 18. */
201 #define LANG_NONE 0x0000
202 #define LANG_C89 0x0001
203 #define LANG_C 0x0002
204 #define LANG_C_PLUS_PLUS 0x0003
205 #define LANG_FORTRAN77 0x0004
206 #define LANG_FORTRAN90 0x0005
207 #define LANG_PASCAL83 0x0006
208 #define LANG_MODULA2 0x0007
209 #define LANG_ADA83 0x0008
210 #define LANG_COBOL74 0x0009
211 #define LANG_COBOL85 0x0010
212 #define LANG_LO_USER 0x8000
213 #define LANG_HI_USER 0xffff