doc/gdbinv-s.m4.in: remove text on special procedures to continue after
[external/binutils.git] / include / dwarf.h
1 /* Dwarf definitions.
2
3    This file is derived from the DWARF specification, Draft #5 by the UNIX
4    International Programming Languages Special Interest Group dated 10/21/91.
5
6    (Extracted from GCC 2.0, snapshot 312 and placed in Cygnus include
7     tree on 11/16/91 by Fred Fish, as part of gdb SVR4 DWARF support.)
8 */
9
10 /* Tag names and codes: Figure 9.  */
11
12 #define TAG_padding                     0x0000
13 #define TAG_array_type                  0x0001
14 #define TAG_class_type                  0x0002
15 #define TAG_entry_point                 0x0003
16 #define TAG_enumeration_type            0x0004
17 #define TAG_formal_parameter            0x0005
18 #define TAG_global_subroutine           0x0006
19 #define TAG_global_variable             0x0007
20 #define TAG_imported_declaration        0x0008
21
22 #define TAG_label                       0x000a
23 #define TAG_lexical_block               0x000b
24 #define TAG_local_variable              0x000c
25 #define TAG_member                      0x000d
26
27 #define TAG_pointer_type                0x000f
28 #define TAG_reference_type              0x0010
29 #define TAG_compile_unit                0x0011
30 #define TAG_source_file                 0x0011
31 #define TAG_string_type                 0x0012
32 #define TAG_structure_type              0x0013
33 #define TAG_subroutine                  0x0014
34 #define TAG_subroutine_type             0x0015
35 #define TAG_typedef                     0x0016
36 #define TAG_union_type                  0x0017
37 #define TAG_unspecified_parameters      0x0018
38 #define TAG_variant                     0x0019
39 #define TAG_common_block                0x001a
40 #define TAG_common_inclusion            0x001b
41 #define TAG_format                      0x001c
42 #define TAG_inheritance                 0x001d
43 #define TAG_inlined_subroutine          0x001e
44 #define TAG_module                      0x001f
45 #define TAG_ptr_to_member_type          0x0020
46 #define TAG_set_type                    0x0021
47 #define TAG_subrange_type               0x0022
48 #define TAG_with_stmt                   0x0023
49
50 #define TAG_lo_user                     0x8000
51 #define TAG_hi_user                     0xffff
52
53 /* Form names and codes: Figure 10.  */
54
55 #define FORM_ADDR       0x1
56 #define FORM_REF        0x2
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
63
64 /* Attribute names and codes: Figure 11.  */
65
66 #define AT_sibling              /* reference */ (0x0010|FORM_REF)
67 #define AT_location             /* block2 */    (0x0020|FORM_BLOCK2)
68 #define AT_name                 /* string */    (0x0030|FORM_STRING)
69 #define AT_fund_type            /* halfword */  (0x0050|FORM_DATA2)
70 #define AT_mod_fund_type        /* block2 */    (0x0060|FORM_BLOCK2)
71 #define AT_user_def_type        /* reference */ (0x0070|FORM_REF)
72 #define AT_mod_u_d_type         /* block2 */    (0x0080|FORM_BLOCK2)
73 #define AT_ordering             /* halfword */  (0x0090|FORM_DATA2)
74 #define AT_subscr_data          /* block2 */    (0x00a0|FORM_BLOCK2)
75 #define AT_byte_size            /* word */      (0x00b0|FORM_DATA4)
76 #define AT_bit_offset           /* halfword */  (0x00c0|FORM_DATA2)
77 #define AT_bit_size             /* word */      (0x00d0|FORM_DATA4)
78
79 #define AT_element_list         /* block4 */    (0x00f0|FORM_BLOCK4)
80 #define AT_stmt_list            /* word */      (0x0100|FORM_DATA4)
81 #define AT_low_pc               /* address */   (0x0110|FORM_ADDR)
82 #define AT_high_pc              /* address */   (0x0120|FORM_ADDR)
83 #define AT_language             /* word */      (0x0130|FORM_DATA4)
84 #define AT_member               /* reference */ (0x0140|FORM_REF)
85 #define AT_discr                /* reference */ (0x0150|FORM_REF)
86 #define AT_discr_value          /* block2 */    (0x0160|FORM_BLOCK2)
87 #define AT_visibility           /* halfword */  (0x0170|FORM_DATA2)
88 #define AT_import               /* reference */ (0x0180|FORM_REF)
89 #define AT_string_length        /* block2 */    (0x0190|FORM_BLOCK2)
90 #define AT_common_reference     /* reference */ (0x01a0|FORM_REF)
91 #define AT_comp_dir             /* string */    (0x01b0|FORM_STRING)
92
93 #define AT_const_value_string   /* string */    (0x01c0|FORM_STRING)
94 #define AT_const_value_data2    /* halfword */  (0x01c0|FORM_DATA2)
95 #define AT_const_value_data4    /* word */      (0x01c0|FORM_DATA4)
96 #define AT_const_value_data8    /* doubleword */(0x01c0|FORM_DATA8)
97 #define AT_const_value_block2   /* block2 */    (0x01c0|FORM_BLOCK2)
98 #define AT_const_value_block4   /* block4 */    (0x01c0|FORM_BLOCK4)
99
100 #define AT_containing_type      /* reference */ (0x01d0|FORM_REF)
101
102 #define AT_default_value_addr   /* address */   (0x01e0|FORM_ADDR)
103 #define AT_default_value_data2  /* halfword */  (0x01e0|FORM_DATA2)
104 #define AT_default_value_data4  /* word */      (0x01e0|FORM_DATA4)
105 #define AT_default_value_data8  /* doubleword */(0x01e0|FORM_DATA8)
106 #define AT_default_value_string /* string */    (0x01e0|FORM_STRING)
107
108 #define AT_friends              /* block2 */    (0x01f0|FORM_BLOCK2)
109 #define AT_inline               /* string */    (0x0200|FORM_STRING)
110 #define AT_is_optional          /* string */    (0x0210|FORM_STRING)
111
112 #define AT_lower_bound_ref      /* reference */ (0x0220|FORM_REF)
113 #define AT_lower_bound_data2    /* halfword */  (0x0220|FORM_DATA2)
114 #define AT_lower_bound_data4    /* word */      (0x0220|FORM_DATA4)
115 #define AT_lower_bound_data8    /* doubleword */(0x0220|FORM_DATA8)
116
117 #define AT_main_program         /* string */    (0x0230|FORM_STRING)
118 #define AT_private              /* string */    (0x0240|FORM_STRING)
119 #define AT_producer             /* string */    (0x0250|FORM_STRING)
120 #define AT_protected            /* string */    (0x0260|FORM_STRING)
121 #define AT_prototyped           /* string */    (0x0270|FORM_STRING)
122 #define AT_public               /* string */    (0x0280|FORM_STRING)
123 #define AT_pure_virtual         /* string */    (0x0290|FORM_STRING)
124 #define AT_return_addr_loc      /* block2 */    (0x02a0|FORM_BLOCK2)
125 #define AT_specification        /* reference */ (0x02b0|FORM_REF)
126 #define AT_start_scope          /* word */      (0x02c0|FORM_DATA4)
127 #define AT_static_link_loc      /* block2 */    (0x02d0|FORM_BLOCK2)
128 #define AT_stride_size          /* word */      (0x02e0|FORM_DATA4)
129
130 #define AT_upper_bound_ref      /* reference */ (0x02f0|FORM_REF)
131 #define AT_upper_bound_data2    /* halfword */  (0x02f0|FORM_DATA2)
132 #define AT_upper_bound_data4    /* word */      (0x02f0|FORM_DATA4)
133 #define AT_upper_bound_data8    /* doubleword */(0x02f0|FORM_DATA8)
134
135 #define AT_virtual              /* string */    (0x0300|FORM_STRING)
136 #define AT_frame_base           /* block2 */    (0x0310|FORM_BLOCK2)
137
138 /* GNU attribute extensions.  */
139
140 #define AT_sf_names             /* word */      (0x8000|FORM_DATA4)
141 #define AT_src_info             /* word */      (0x8010|FORM_DATA4)
142 #define AT_mac_info             /* word */      (0x8020|FORM_DATA4)
143
144 #define AT_lo_user              /* - */         0x8000
145 #define AT_hi_user              /* - */         0xffff
146
147 /* Location atom names and codes: Figure 13.  */
148
149 #define OP_REG          0x01
150 #define OP_BASEREG      0x02
151 #define OP_ADDR         0x03
152 #define OP_CONST        0x04
153 #define OP_DEREF2       0x05
154 #define OP_DEREF4       0x06
155 #define OP_ADD          0x07
156    
157 #define OP_LO_USER      0x80
158 #define OP_HI_USER      0xff
159
160 /* Fundamental type names and codes: figure 14.  */
161
162 #define FT_char                 0x0001
163 #define FT_signed_char          0x0002
164 #define FT_unsigned_char        0x0003
165 #define FT_short                0x0004
166 #define FT_signed_short         0x0005
167 #define FT_unsigned_short       0x0006
168 #define FT_integer              0x0007
169 #define FT_signed_integer       0x0008
170 #define FT_unsigned_integer     0x0009
171 #define FT_long                 0x000a
172 #define FT_signed_long          0x000b
173 #define FT_unsigned_long        0x000c
174 #define FT_pointer              0x000d
175 #define FT_float                0x000e
176 #define FT_dbl_prec_float       0x000f
177 #define FT_ext_prec_float       0x0010  /* not accepted by "classic" svr4 SDB */
178 #define FT_complex              0x0011  /* not accepted by "classic" svr4 SDB */
179 #define FT_dbl_prec_complex     0x0012  /* not accepted by "classic" svr4 SDB */
180
181 #define FT_void                 0x0014
182 #define FT_boolean              0x0015  /* not accepted by "classic" svr4 SDB */
183 #define FT_ext_prec_complex     0x0016  /* not accepted by "classic" svr4 SDB */
184   
185 /* GNU-specific fundamental type codes - not accepted by "classic" svr4 SDB */
186
187 #define FT_long_long            0x8000
188 #define FT_signed_long_long     0x8001
189 #define FT_unsigned_long_long   0x8002
190   
191 #define FT_lo_user              0x8000
192 #define FT_hi_user              0xffff
193
194 /* Type modifier names and codes: Figure 15.  */
195
196 #define MOD_pointer_to          0x01
197 #define MOD_reference_to        0x02
198 #define MOD_const               0x03
199 #define MOD_volatile            0x04
200      
201 #define MOD_lo_user             0x80
202 #define MOD_hi_user             0xff
203      
204 /* Visibility names and codes: Figure 16.  */
205      
206 #define VIS_local               0x00
207 #define VIS_exported            0x01
208      
209 #define VIS_lo_user             0x80
210 #define VIS_hi_user             0xff
211
212 /* Array ordering names and codes: Figure 18.  */
213
214 #define ORD_row_major   0
215 #define ORD_col_major   1
216
217 /* Array subscript format names and codes: Figure 19.  */
218
219 #define FMT_FT_C_C      0x0
220 #define FMT_FT_C_X      0x1
221 #define FMT_FT_X_C      0x2
222 #define FMT_FT_X_X      0x3
223 #define FMT_UT_C_C      0x4
224 #define FMT_UT_C_X      0x5
225 #define FMT_UT_X_C      0x6
226 #define FMT_UT_X_X      0x7
227 #define FMT_ET          0x8
228
229 /* Derived from above for ease of use.  */
230
231 #define FMT_CODE(_FUNDAMENTAL_TYPE_P, _UB_CONST_P, _LB_CONST_P) \
232  (((_FUNDAMENTAL_TYPE_P) ? 0 : 4)       \
233   | ((_UB_CONST_P) ? 0 : 2)             \
234   | ((_LB_CONST_P) ? 0 : 1))
235
236 /* Source language names and codes: Figure 17.  */
237
238 #define LANG_C89                0x0001
239 #define LANG_C                  0x0002
240 #define LANG_ADA83              0x0003
241 #define LANG_C_PLUS_PLUS        0x0004
242 #define LANG_COBOL74            0x0005
243 #define LANG_COBOL85            0x0006
244 #define LANG_FORTRAN77          0x0007
245 #define LANG_FORTRAN90          0x0008
246 #define LANG_PASCAL83           0x0009
247 #define LANG_MODULA2            0x000a
248
249 #define LANG_LO_USER            0x8000
250 #define LANG_HI_USER            0xffff
251
252 /* Names and codes for GNU "macinfo" extension.  */
253
254 #define MACINFO_start           's'
255 #define MACINFO_resume          'r'
256 #define MACINFO_define          'd'
257 #define MACINFO_undef           'u'