xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-abbrev-duplicate.s (revision 2d1fc4375f3885f0ee0ffcb58fc554530cd74ef2)
1b136c393SPavel Labath# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \
2b136c393SPavel Labath# RUN:   not llvm-dwarfdump -verify - | FileCheck %s
3b136c393SPavel Labath
4b136c393SPavel Labath# CHECK: Duplicate abbreviation code.
5b136c393SPavel Labath
6b136c393SPavel Labath	.section	.debug_str,"MS",@progbits,1
7b136c393SPavel Labath.Lstring_producer:
8b136c393SPavel Labath	.asciz	"Hand-written dwarf"
9b136c393SPavel Labath
10b136c393SPavel Labath	.section	.debug_abbrev,"",@progbits
11b136c393SPavel Labath.Lsection_abbrev:
12b136c393SPavel Labath	.byte	1                       # Abbreviation Code
13b136c393SPavel Labath	.byte	17                      # DW_TAG_compile_unit
14b136c393SPavel Labath	.byte	1                       # DW_CHILDREN_yes
15b136c393SPavel Labath	.byte	37                      # DW_AT_producer
16b136c393SPavel Labath	.byte	14                      # DW_FORM_strp
17b136c393SPavel Labath	.byte	19                      # DW_AT_language
18b136c393SPavel Labath	.byte	5                       # DW_FORM_data2
19b136c393SPavel Labath	.byte	0                       # EOM(1)
20b136c393SPavel Labath	.byte	0                       # EOM(2)
21b136c393SPavel Labath	.byte	0                       # EOM(3)
22b136c393SPavel Labath
23b136c393SPavel Labath	.section	.debug_info,"",@progbits
24b136c393SPavel Labath.Lcu_begin0:
25b136c393SPavel Labath	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
26b136c393SPavel Labath.Lcu_start0:
27b136c393SPavel Labath	.short	4                       # DWARF version number
28b136c393SPavel Labath	.long	.Lsection_abbrev        # Offset Into Abbrev. Section
29b136c393SPavel Labath	.byte	8                       # Address Size (in bytes)
30b136c393SPavel Labath	.byte	1                       # Abbrev [1] DW_TAG_compile_unit
31b136c393SPavel Labath	.long	.Lstring_producer       # DW_AT_producer
32b136c393SPavel Labath	.short	12                      # DW_AT_language
33b136c393SPavel Labath	.byte	0                       # End Of Children Mark
34b136c393SPavel Labath.Lcu_end0:
35b136c393SPavel Labath
36b136c393SPavel Labath	.section	.debug_names,"",@progbits
37b136c393SPavel Labath	.long	.Lnames_end0-.Lnames_start0 # Header: contribution length
38b136c393SPavel Labath.Lnames_start0:
39b136c393SPavel Labath	.short	5                       # Header: version
40b136c393SPavel Labath	.short	0                       # Header: padding
41b136c393SPavel Labath	.long	1                       # Header: compilation unit count
42b136c393SPavel Labath	.long	0                       # Header: local type unit count
43b136c393SPavel Labath	.long	0                       # Header: foreign type unit count
44b136c393SPavel Labath	.long	0                       # Header: bucket count
45b136c393SPavel Labath	.long	0                       # Header: name count
46b136c393SPavel Labath	.long	.Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
47b136c393SPavel Labath	.long	0                       # Header: augmentation length
48b136c393SPavel Labath	.long	.Lcu_begin0             # Compilation unit 0
49b136c393SPavel Labath.Lnames_abbrev_start0:
50b136c393SPavel Labath	.byte	46                      # Abbrev code
51b136c393SPavel Labath	.byte	46                      # DW_TAG_subprogram
52b136c393SPavel Labath	.byte	3                       # DW_IDX_die_offset
53*2d1fc437SPavel Labath	.byte	19                      # DW_FORM_ref4
54b136c393SPavel Labath	.byte	0                       # End of abbrev
55b136c393SPavel Labath	.byte	0                       # End of abbrev
56b136c393SPavel Labath	.byte	46                      # Abbrev code
57b136c393SPavel Labath	.byte	46                      # DW_TAG_subprogram
58b136c393SPavel Labath	.byte	3                       # DW_IDX_die_offset
59*2d1fc437SPavel Labath	.byte	19                      # DW_FORM_ref4
60b136c393SPavel Labath	.byte	0                       # End of abbrev
61b136c393SPavel Labath	.byte	0                       # End of abbrev
62b136c393SPavel Labath	.byte	0                       # End of abbrev list
63b136c393SPavel Labath.Lnames_abbrev_end0:
64b136c393SPavel Labath.Lnames_end0:
65