blob: 51497121c22b39b22f48c19b99663f4c28ce23aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
(* *********************************************************************)
(* *)
(* The Compcert verified compiler *)
(* *)
(* Bernhard Schommer, AbsInt Angewandte Informatik GmbH *)
(* *)
(* AbsInt Angewandte Informatik GmbH. All rights reserved. This file *)
(* is distributed under the terms of the INRIA Non-Commercial *)
(* License Agreement. *)
(* *)
(* *********************************************************************)
(* Types used for writing dwarf debug information *)
(* Basic types for the value of attributes *)
type constant = int
type flag = bool
type reference = int
type encoding =
| DW_ATE_address
| DW_ATE_boolean
| DW_ATE_complex_float
| DW_ATE_float
| DW_ATE_signed
| DW_ATE_signed_char
| DW_ATE_unsigned
| DW_ATE_unsigned_char
type identifier_case =
| DW_ID_case_sensitive
| DW_ID_up_case
| DW_ID_down_case
| DW_ID_case_insensitive
type address = int
type language =
| DW_LANG_C
| DW_LANG_C89
type block = string (* Used as bitvector *)
type calling_convention =
| DW_CC_normal
| DW_CC_program
| DW_CC_nocall
| DW_CC_lo_user
| DW_CC_hi_user
type inline =
| DW_INL_not_inlined
| DW_INL_inlined
| DW_INL_declared_not_inlined
| DW_INL_declared_inlined
type const_value =
| String of string
| Const of constant
| Block of block
type location_value =
| Const of constant
| Block of block
type data_location_value =
| Block of block
| Ref of reference
type bound_value =
| Const of constant
| Ref of reference
(* Types representing the attribute information per tag value *)
type dw_tag_array_type =
{
dw_at_byte_size: constant option;
dw_at_declaration: flag option;
dw_at_name: string option;
dw_at_sibling: reference option;
dw_at_start_scope: constant option;
dw_at_stride_size: constant option;
dw_at_type: reference option;
}
type dw_tag_base_type =
{
dw_at_bit_offset: constant option;
dw_at_bit_size: constant option;
dw_at_byte_size: constant option;
dw_at_encoding: encoding option;
dw_at_name: string option;
dw_at_sibling: reference option;
}
type dw_tag_compile_unit =
{
dw_at_base_types: reference option;
dw_at_comp_dir: string option;
dw_at_identifier_case: identifier_case option;
dw_at_high_pc: address option;
dw_at_language: language option;
dw_at_low_pc: address option;
dw_at_macro_info: constant option;
dw_at_name: string option;
dw_at_producer: string option;
dw_at_sibling: reference option;
dw_at_stmt_list: constant option;
}
type dw_tag_const_type =
{
dw_at_sibling: reference option;
dw_at_type: reference option;
}
type dw_tag_constant =
{
dw_at_const_value: constant option;
dw_at_declaration: flag option;
dw_at_external: flag option;
dw_at_name: string option;
dw_at_sibling: reference option;
dw_at_start_scope: constant option;
dw_at_type: reference option;
}
type dw_tag_enumeration_type =
{
dw_at_byte_size: constant option;
dw_at_declaration: flag option;
dw_at_name: string option;
dw_at_sibling: reference option;
dw_at_start_scope: constant option;
}
type dw_tag_enumerator =
{
dw_at_const_value: constant option;
dw_at_name: string option;
dw_at_sibling: reference option;
}
type dw_tag_formal_parameter =
{
dw_at_artificial: flag option;
dw_at_location: location_value option;
dw_at_name: string option;
dw_at_segment: location_value option;
dw_at_sibling: reference option;
dw_at_type: reference option;
dw_at_variable_parameter: flag option;
}
type dw_tag_inlined_subroutine =
{
dw_at_high_pc: address option;
dw_at_low_pc: address option;
dw_at_segment: location_value option;
dw_at_sibling: reference option;
dw_at_return_addr: location_value option;
dw_at_start_scope: constant option;
}
type dw_tag_label =
{
dw_at_low_pc: address option;
dw_at_name: string option;
dw_at_segment: location_value option;
dw_at_start_scope: constant option;
dw_at_sibling: reference option;
}
type dw_tag_lexical_block =
{
dw_at_high_pc: address option;
dw_at_low_pc: address option;
dw_at_name: string option;
dw_at_segment: location_value option;
dw_at_sibling: reference option;
}
type dw_tag_member =
{
dw_at_byte_size: constant option;
dw_at_bit_offset: constant option;
dw_at_bit_size: constant option;
dw_at_data_member_location: data_location_value option;
dw_at_declaration: flag option;
dw_at_name: string option;
dw_at_sibling: reference option;
dw_at_type: reference option;
}
type dw_tag_pointer_type =
{
dw_at_address_class: constant option;
dw_at_sibling: reference option;
dw_at_type: reference option;
}
type dw_tag_structure_type =
{
dw_at_byte_size: constant option;
dw_at_declaration: flag option;
dw_at_name: string option;
dw_at_sibling: reference option;
dw_at_start_scope: constant option;
}
type dw_tag_subprogram =
{
dw_at_address_class: constant option;
dw_at_artificial: flag option;
dw_at_calling_convention: calling_convention option;
dw_at_declaration: flag option;
dw_at_external: flag option;
dw_at_frame_base: location_value option;
dw_at_high_pc: address option;
dw_at_inline: inline option;
dw_at_low_pc: address option;
dw_at_name: string option;
dw_at_prototyped: flag option;
dw_at_return_addr: location_value option;
dw_at_segment: location_value option;
dw_at_sibling: reference option;
dw_at_start_scope: constant option;
dw_at_static_link: location_value option;
dw_at_type: reference option;
}
type dw_subrange_type =
{
dw_at_byte_size: constant option;
dw_at_declaration: flag option;
dw_at_count: bound_value option;
dw_at_lower_bound: bound_value option;
dw_at_name: string option;
dw_at_sibling: reference option;
dw_at_type: reference option;
dw_at_upper_bound: bound_value option;
}
type dw_tag_subroutine_type =
{
dw_at_address_class: constant option;
dw_at_declaration: flag option;
dw_at_name: string option;
dw_at_prototyped: flag option;
dw_at_sibling: reference option;
dw_at_type: reference option;
}
type dw_tag_typedef =
{
dw_at_declaration: flag option;
dw_at_name: string option;
dw_at_sibling: reference option;
dw_at_start_scope: constant option;
dw_at_type: reference option;
}
type dw_tag_union_type =
{
dw_at_byte_size: constant option;
dw_at_declaration: flag option;
dw_at_name: string option;
dw_at_sibling: reference option;
dw_at_start_scope: constant option;
dw_at_type: reference option;
}
type dw_tag_unspecified_parameter =
{
dw_at_artificial: flag option;
dw_at_sibling: reference option;
}
type dw_tag_variable =
{
dw_at_const_value: constant option;
dw_at_declaration: flag option;
dw_at_external: flag option;
dw_at_location: location_value option;
dw_at_name: string option;
dw_at_segment: location_value option;
dw_at_sibling: reference option;
dw_at_start_scope: constant option;
dw_at_type: reference option;
}
type dw_tag_volatile_type =
{
dw_at_sibling: reference option;
dw_at_type: reference option;
}
|