Skip to content

Commit fb9b4b7

Browse files
committed
Sync dwarf headers with master versions in gcc repository.
* dwarf2.def: Sync with mainline gcc sources * dwarf2.h: Likewise. 2016-12-21 Jakub Jelinek <jakub@redhat.com> * dwarf2.def (DW_FORM_ref_sup): Renamed to ... (DW_FORM_ref_sup4): ... this. New form. (DW_FORM_ref_sup8): New form. 2016-10-17 Jakub Jelinek <jakub@redhat.com> * dwarf2.h (enum dwarf_calling_convention): Add new DWARF5 calling convention codes. (enum dwarf_line_number_content_type): New. (enum dwarf_location_list_entry_type): Add DWARF5 DW_LLE_* codes. (enum dwarf_source_language): Add new DWARF5 DW_LANG_* codes. (enum dwarf_macro_record_type): Add DWARF5 DW_MACRO_* codes. (enum dwarf_name_index_attribute): New. (enum dwarf_range_list_entry): New. (enum dwarf_unit_type): New. * dwarf2.def: Add new DWARF5 DW_TAG_*, DW_FORM_*, DW_AT_*, DW_OP_* and DW_ATE_* entries. 2016-08-15 Jakub Jelinek <jakub@redhat.com> * dwarf2.def (DW_AT_string_length_bit_size, DW_AT_string_length_byte_size): New attributes. 2016-08-12 Alexandre Oliva <aoliva@redhat.com> PR debug/63240 * dwarf2.def (DW_AT_deleted, DW_AT_defaulted): New. * dwarf2.h (enum dwarf_defaulted_attribute): New.
1 parent a44d0bd commit fb9b4b7

3 files changed

Lines changed: 213 additions & 18 deletions

File tree

‎include/ChangeLog‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
2017-01-03 Nick Clifton <nickc@redhat.com>
2+
3+
* dwarf2.def: Sync with mainline gcc sources
4+
* dwarf2.h: Likewise.
5+
6+
2016-12-21 Jakub Jelinek <jakub@redhat.com>
7+
8+
* dwarf2.def (DW_FORM_ref_sup): Renamed to ...
9+
(DW_FORM_ref_sup4): ... this. New form.
10+
(DW_FORM_ref_sup8): New form.
11+
12+
2016-10-17 Jakub Jelinek <jakub@redhat.com>
13+
14+
* dwarf2.h (enum dwarf_calling_convention): Add new DWARF5
15+
calling convention codes.
16+
(enum dwarf_line_number_content_type): New.
17+
(enum dwarf_location_list_entry_type): Add DWARF5 DW_LLE_*
18+
codes.
19+
(enum dwarf_source_language): Add new DWARF5 DW_LANG_* codes.
20+
(enum dwarf_macro_record_type): Add DWARF5 DW_MACRO_* codes.
21+
(enum dwarf_name_index_attribute): New.
22+
(enum dwarf_range_list_entry): New.
23+
(enum dwarf_unit_type): New.
24+
* dwarf2.def: Add new DWARF5 DW_TAG_*, DW_FORM_*, DW_AT_*,
25+
DW_OP_* and DW_ATE_* entries.
26+
27+
2016-08-15 Jakub Jelinek <jakub@redhat.com>
28+
29+
* dwarf2.def (DW_AT_string_length_bit_size,
30+
DW_AT_string_length_byte_size): New attributes.
31+
32+
2016-08-12 Alexandre Oliva <aoliva@redhat.com>
33+
34+
PR debug/63240
35+
* dwarf2.def (DW_AT_deleted, DW_AT_defaulted): New.
36+
* dwarf2.h (enum dwarf_defaulted_attribute): New.
37+
138
2017-01-02 Alan Modra <amodra@gmail.com>
239

340
Update year range in copyright notice of all files.

‎include/dwarf2.def‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,14 @@ DW_TAG (DW_TAG_type_unit, 0x41)
132132
DW_TAG (DW_TAG_rvalue_reference_type, 0x42)
133133
DW_TAG (DW_TAG_template_alias, 0x43)
134134
/* DWARF 5. */
135+
DW_TAG (DW_TAG_coarray_type, 0x44)
136+
DW_TAG (DW_TAG_generic_subrange, 0x45)
137+
DW_TAG (DW_TAG_dynamic_type, 0x46)
135138
DW_TAG (DW_TAG_atomic_type, 0x47)
139+
DW_TAG (DW_TAG_call_site, 0x48)
140+
DW_TAG (DW_TAG_call_site_parameter, 0x49)
141+
DW_TAG (DW_TAG_skeleton_unit, 0x4a)
142+
DW_TAG (DW_TAG_immutable_type, 0x4b)
136143

137144
DW_TAG_DUP (DW_TAG_lo_user, 0x4080)
138145
DW_TAG_DUP (DW_TAG_hi_user, 0xffff)
@@ -202,6 +209,17 @@ DW_FORM (DW_FORM_sec_offset, 0x17)
202209
DW_FORM (DW_FORM_exprloc, 0x18)
203210
DW_FORM (DW_FORM_flag_present, 0x19)
204211
DW_FORM (DW_FORM_ref_sig8, 0x20)
212+
/* DWARF 5. */
213+
DW_FORM (DW_FORM_strx, 0x1a)
214+
DW_FORM (DW_FORM_addrx, 0x1b)
215+
DW_FORM (DW_FORM_ref_sup4, 0x1c)
216+
DW_FORM (DW_FORM_strp_sup, 0x1d)
217+
DW_FORM (DW_FORM_data16, 0x1e)
218+
DW_FORM (DW_FORM_line_strp, 0x1f)
219+
DW_FORM (DW_FORM_implicit_const, 0x21)
220+
DW_FORM (DW_FORM_loclistx, 0x22)
221+
DW_FORM (DW_FORM_rnglistx, 0x23)
222+
DW_FORM (DW_FORM_ref_sup8, 0x24)
205223
/* Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFission. */
206224
DW_FORM (DW_FORM_GNU_addr_index, 0x1f01)
207225
DW_FORM (DW_FORM_GNU_str_index, 0x1f02)
@@ -309,7 +327,35 @@ DW_AT (DW_AT_const_expr, 0x6c)
309327
DW_AT (DW_AT_enum_class, 0x6d)
310328
DW_AT (DW_AT_linkage_name, 0x6e)
311329
/* DWARF 5. */
330+
DW_AT (DW_AT_string_length_bit_size, 0x6f)
331+
DW_AT (DW_AT_string_length_byte_size, 0x70)
332+
DW_AT (DW_AT_rank, 0x71)
333+
DW_AT (DW_AT_str_offsets_base, 0x72)
334+
DW_AT (DW_AT_addr_base, 0x73)
335+
DW_AT (DW_AT_rnglists_base, 0x74)
336+
DW_AT (DW_AT_dwo_name, 0x76)
337+
DW_AT (DW_AT_reference, 0x77)
338+
DW_AT (DW_AT_rvalue_reference, 0x78)
339+
DW_AT (DW_AT_macros, 0x79)
340+
DW_AT (DW_AT_call_all_calls, 0x7a)
341+
DW_AT (DW_AT_call_all_source_calls, 0x7b)
342+
DW_AT (DW_AT_call_all_tail_calls, 0x7c)
343+
DW_AT (DW_AT_call_return_pc, 0x7d)
344+
DW_AT (DW_AT_call_value, 0x7e)
345+
DW_AT (DW_AT_call_origin, 0x7f)
346+
DW_AT (DW_AT_call_parameter, 0x80)
347+
DW_AT (DW_AT_call_pc, 0x81)
348+
DW_AT (DW_AT_call_tail_call, 0x82)
349+
DW_AT (DW_AT_call_target, 0x83)
350+
DW_AT (DW_AT_call_target_clobbered, 0x84)
351+
DW_AT (DW_AT_call_data_location, 0x85)
352+
DW_AT (DW_AT_call_data_value, 0x86)
312353
DW_AT (DW_AT_noreturn, 0x87)
354+
DW_AT (DW_AT_alignment, 0x88)
355+
DW_AT (DW_AT_export_symbols, 0x89)
356+
DW_AT (DW_AT_deleted, 0x8a)
357+
DW_AT (DW_AT_defaulted, 0x8b)
358+
DW_AT (DW_AT_loclists_base, 0x8c)
313359

314360
DW_AT_DUP (DW_AT_lo_user, 0x2000) /* Implementation-defined range start. */
315361
DW_AT_DUP (DW_AT_hi_user, 0x3fff) /* Implementation-defined range end. */
@@ -591,6 +637,18 @@ DW_OP (DW_OP_bit_piece, 0x9d)
591637
DW_OP (DW_OP_implicit_value, 0x9e)
592638
DW_OP (DW_OP_stack_value, 0x9f)
593639

640+
/* DWARF 5 extensions. */
641+
DW_OP (DW_OP_implicit_pointer, 0xa0)
642+
DW_OP (DW_OP_addrx, 0xa1)
643+
DW_OP (DW_OP_constx, 0xa2)
644+
DW_OP (DW_OP_entry_value, 0xa3)
645+
DW_OP (DW_OP_const_type, 0xa4)
646+
DW_OP (DW_OP_regval_type, 0xa5)
647+
DW_OP (DW_OP_deref_type, 0xa6)
648+
DW_OP (DW_OP_xderef_type, 0xa7)
649+
DW_OP (DW_OP_convert, 0xa8)
650+
DW_OP (DW_OP_reinterpret, 0xa9)
651+
594652
DW_OP_DUP (DW_OP_lo_user, 0xe0) /* Implementation-defined range start. */
595653
DW_OP_DUP (DW_OP_hi_user, 0xff) /* Implementation-defined range end. */
596654

@@ -648,6 +706,9 @@ DW_ATE (DW_ATE_unsigned_fixed, 0xe)
648706
DW_ATE (DW_ATE_decimal_float, 0xf)
649707
/* DWARF 4. */
650708
DW_ATE (DW_ATE_UTF, 0x10)
709+
/* DWARF 5. */
710+
DW_ATE (DW_ATE_UCS, 0x11)
711+
DW_ATE (DW_ATE_ASCII, 0x12)
651712

652713
DW_ATE_DUP (DW_ATE_lo_user, 0x80)
653714
DW_ATE_DUP (DW_ATE_hi_user, 0xff)

‎include/dwarf2.h‎

Lines changed: 115 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ enum dwarf_calling_convention
175175
DW_CC_program = 0x2,
176176
DW_CC_nocall = 0x3,
177177

178+
/* DWARF 5. */
179+
DW_CC_pass_by_reference = 0x4,
180+
DW_CC_pass_by_value = 0x5,
181+
178182
DW_CC_lo_user = 0x40,
179183
DW_CC_hi_user = 0xff,
180184

@@ -257,15 +261,38 @@ enum dwarf_line_number_hp_sfc_ops
257261
DW_LNE_HP_SFC_associate = 3
258262
};
259263

260-
/* Type codes for location list entries.
261-
Extension for Fission. See http://gcc.gnu.org/wiki/DebugFission. */
264+
/* Content type codes in line table directory_entry_format
265+
and file_name_entry_format sequences. */
266+
enum dwarf_line_number_content_type
267+
{
268+
DW_LNCT_path = 0x1,
269+
DW_LNCT_directory_index = 0x2,
270+
DW_LNCT_timestamp = 0x3,
271+
DW_LNCT_size = 0x4,
272+
DW_LNCT_MD5 = 0x5,
273+
DW_LNCT_lo_user = 0x2000,
274+
DW_LNCT_hi_user = 0x3fff
275+
};
262276

277+
/* Type codes for location list entries. */
263278
enum dwarf_location_list_entry_type
264279
{
265-
DW_LLE_GNU_end_of_list_entry = 0,
266-
DW_LLE_GNU_base_address_selection_entry = 1,
267-
DW_LLE_GNU_start_end_entry = 2,
268-
DW_LLE_GNU_start_length_entry = 3
280+
DW_LLE_end_of_list = 0x00,
281+
DW_LLE_base_addressx = 0x01,
282+
DW_LLE_startx_endx = 0x02,
283+
DW_LLE_startx_length = 0x03,
284+
DW_LLE_offset_pair = 0x04,
285+
DW_LLE_default_location = 0x05,
286+
DW_LLE_base_address = 0x06,
287+
DW_LLE_start_end = 0x07,
288+
DW_LLE_start_length = 0x08,
289+
290+
/* Former extension for Fission.
291+
See http://gcc.gnu.org/wiki/DebugFission. */
292+
DW_LLE_GNU_end_of_list_entry = 0x00,
293+
DW_LLE_GNU_base_address_selection_entry = 0x01,
294+
DW_LLE_GNU_start_end_entry = 0x02,
295+
DW_LLE_GNU_start_length_entry = 0x03
269296
};
270297

271298
#define DW_CIE_ID 0xffffffff
@@ -305,14 +332,22 @@ enum dwarf_source_language
305332
/* DWARF 4. */
306333
DW_LANG_Python = 0x0014,
307334
/* DWARF 5. */
335+
DW_LANG_OpenCL = 0x0015,
308336
DW_LANG_Go = 0x0016,
309-
310-
DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */
337+
DW_LANG_Modula3 = 0x0017,
338+
DW_LANG_Haskell = 0x0018,
339+
DW_LANG_C_plus_plus_03 = 0x0019,
340+
DW_LANG_C_plus_plus_11 = 0x001a,
341+
DW_LANG_OCaml = 0x001b,
311342
DW_LANG_Rust = 0x001c,
312343
DW_LANG_C11 = 0x001d,
344+
DW_LANG_Swift = 0x001e,
345+
DW_LANG_Julia = 0x001f,
346+
DW_LANG_Dylan = 0x0020,
313347
DW_LANG_C_plus_plus_14 = 0x0021,
314348
DW_LANG_Fortran03 = 0x0022,
315349
DW_LANG_Fortran08 = 0x0023,
350+
DW_LANG_RenderScript = 0x0024,
316351

317352
DW_LANG_lo_user = 0x8000, /* Implementation-defined range start. */
318353
DW_LANG_hi_user = 0xffff, /* Implementation-defined range start. */
@@ -342,24 +377,86 @@ enum dwarf_macinfo_record_type
342377
DW_MACINFO_vendor_ext = 255
343378
};
344379

380+
/* DW_TAG_defaulted/DW_TAG_GNU_defaulted attributes. */
381+
enum dwarf_defaulted_attribute
382+
{
383+
DW_DEFAULTED_no = 0x00,
384+
DW_DEFAULTED_in_class = 0x01,
385+
DW_DEFAULTED_out_of_class = 0x02
386+
};
387+
345388
/* Names and codes for new style macro information. */
346389
enum dwarf_macro_record_type
347390
{
348-
DW_MACRO_GNU_define = 1,
349-
DW_MACRO_GNU_undef = 2,
350-
DW_MACRO_GNU_start_file = 3,
351-
DW_MACRO_GNU_end_file = 4,
352-
DW_MACRO_GNU_define_indirect = 5,
353-
DW_MACRO_GNU_undef_indirect = 6,
354-
DW_MACRO_GNU_transparent_include = 7,
391+
DW_MACRO_define = 0x01,
392+
DW_MACRO_undef = 0x02,
393+
DW_MACRO_start_file = 0x03,
394+
DW_MACRO_end_file = 0x04,
395+
DW_MACRO_define_strp = 0x05,
396+
DW_MACRO_undef_strp = 0x06,
397+
DW_MACRO_import = 0x07,
398+
DW_MACRO_define_sup = 0x08,
399+
DW_MACRO_undef_sup = 0x09,
400+
DW_MACRO_import_sup = 0x0a,
401+
DW_MACRO_define_strx = 0x0b,
402+
DW_MACRO_undef_strx = 0x0c,
403+
DW_MACRO_lo_user = 0xe0,
404+
DW_MACRO_hi_user = 0xff,
405+
406+
/* Compatibility macros for the GNU .debug_macro extension. */
407+
DW_MACRO_GNU_define = 0x01,
408+
DW_MACRO_GNU_undef = 0x02,
409+
DW_MACRO_GNU_start_file = 0x03,
410+
DW_MACRO_GNU_end_file = 0x04,
411+
DW_MACRO_GNU_define_indirect = 0x05,
412+
DW_MACRO_GNU_undef_indirect = 0x06,
413+
DW_MACRO_GNU_transparent_include = 0x07,
355414
/* Extensions for DWZ multifile.
356415
See http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open . */
357-
DW_MACRO_GNU_define_indirect_alt = 8,
358-
DW_MACRO_GNU_undef_indirect_alt = 9,
359-
DW_MACRO_GNU_transparent_include_alt = 10,
416+
DW_MACRO_GNU_define_indirect_alt = 0x08,
417+
DW_MACRO_GNU_undef_indirect_alt = 0x09,
418+
DW_MACRO_GNU_transparent_include_alt = 0x0a,
360419
DW_MACRO_GNU_lo_user = 0xe0,
361420
DW_MACRO_GNU_hi_user = 0xff
362421
};
422+
423+
/* Index attributes in the Abbreviations Table. */
424+
enum dwarf_name_index_attribute
425+
{
426+
DW_IDX_compile_unit = 1,
427+
DW_IDX_type_unit = 2,
428+
DW_IDX_die_offset = 3,
429+
DW_IDX_parent = 4,
430+
DW_IDX_type_hash = 5,
431+
DW_IDX_lo_user = 0x2000,
432+
DW_IDX_hi_user = 0x3fff
433+
};
434+
435+
/* Range list entry kinds in .debug_rnglists* section. */
436+
enum dwarf_range_list_entry
437+
{
438+
DW_RLE_end_of_list = 0x00,
439+
DW_RLE_base_addressx = 0x01,
440+
DW_RLE_startx_endx = 0x02,
441+
DW_RLE_startx_length = 0x03,
442+
DW_RLE_offset_pair = 0x04,
443+
DW_RLE_base_address = 0x05,
444+
DW_RLE_start_end = 0x06,
445+
DW_RLE_start_length = 0x07
446+
};
447+
448+
/* Unit types in unit_type unit header field. */
449+
enum dwarf_unit_type
450+
{
451+
DW_UT_compile = 0x01,
452+
DW_UT_type = 0x02,
453+
DW_UT_partial = 0x03,
454+
DW_UT_skeleton = 0x04,
455+
DW_UT_split_compile = 0x05,
456+
DW_UT_split_type = 0x06,
457+
DW_UT_lo_user = 0x80,
458+
DW_UT_hi_user = 0xff
459+
};
363460

364461
/* @@@ For use with GNU frame unwind information. */
365462

0 commit comments

Comments
 (0)