xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-no-buckets.s (revision 79cd942c236c696d6b2cc5bb82ad6ed535a98e9a)
1906b777aSPavel Labath# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \
2906b777aSPavel Labath# RUN:   llvm-dwarfdump -verify - | FileCheck %s
3906b777aSPavel Labath
4906b777aSPavel Labath# CHECK: warning: Name Index @ 0x0 does not contain a hash table.
5906b777aSPavel Labath	.section	.debug_str,"MS",@progbits,1
6906b777aSPavel Labath.Lstring_foo:
7906b777aSPavel Labath	.asciz	"foo"
8906b777aSPavel Labath.Lstring_producer:
9906b777aSPavel Labath	.asciz	"Hand-written dwarf"
10906b777aSPavel Labath
11906b777aSPavel Labath	.section	.debug_abbrev,"",@progbits
12906b777aSPavel Labath.Lsection_abbrev:
13906b777aSPavel Labath	.byte	1                       # Abbreviation Code
14906b777aSPavel Labath	.byte	17                      # DW_TAG_compile_unit
15906b777aSPavel Labath	.byte	1                       # DW_CHILDREN_yes
16906b777aSPavel Labath	.byte	37                      # DW_AT_producer
17906b777aSPavel Labath	.byte	14                      # DW_FORM_strp
18906b777aSPavel Labath	.byte	19                      # DW_AT_language
19906b777aSPavel Labath	.byte	5                       # DW_FORM_data2
20906b777aSPavel Labath	.byte	0                       # EOM(1)
21906b777aSPavel Labath	.byte	0                       # EOM(2)
22906b777aSPavel Labath	.byte	2                       # Abbreviation Code
23906b777aSPavel Labath	.byte	46                      # DW_TAG_subprogram
24906b777aSPavel Labath	.byte	0                       # DW_CHILDREN_no
25906b777aSPavel Labath	.byte	3                       # DW_AT_name
26906b777aSPavel Labath	.byte	14                      # DW_FORM_strp
27906b777aSPavel Labath	.byte	63                      # DW_AT_external
28906b777aSPavel Labath	.byte	25                      # DW_FORM_flag_present
29906b777aSPavel Labath	.byte	0                       # EOM(1)
30906b777aSPavel Labath	.byte	0                       # EOM(2)
31906b777aSPavel Labath	.byte	0                       # EOM(3)
32906b777aSPavel Labath
33906b777aSPavel Labath	.section	.debug_info,"",@progbits
34906b777aSPavel Labath.Lcu_begin0:
35906b777aSPavel Labath	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
36906b777aSPavel Labath.Lcu_start0:
37906b777aSPavel Labath	.short	4                       # DWARF version number
38906b777aSPavel Labath	.long	.Lsection_abbrev        # Offset Into Abbrev. Section
39906b777aSPavel Labath	.byte	8                       # Address Size (in bytes)
40906b777aSPavel Labath	.byte	1                       # Abbrev [1] DW_TAG_compile_unit
41906b777aSPavel Labath	.long	.Lstring_producer       # DW_AT_producer
42906b777aSPavel Labath	.short	12                      # DW_AT_language
43906b777aSPavel Labath.Ldie_foo:
44906b777aSPavel Labath	.byte	2                       # Abbrev [2] DW_TAG_subprogram
45906b777aSPavel Labath	.long	.Lstring_foo            # DW_AT_name
46906b777aSPavel Labath                                        # DW_AT_external
47906b777aSPavel Labath	.byte	0                       # End Of Children Mark
48906b777aSPavel Labath.Lcu_end0:
49906b777aSPavel Labath
50906b777aSPavel Labath	.section	.debug_names,"",@progbits
51906b777aSPavel Labath	.long	.Lnames_end0-.Lnames_start0 # Header: contribution length
52906b777aSPavel Labath.Lnames_start0:
53906b777aSPavel Labath	.short	5                       # Header: version
54906b777aSPavel Labath	.short	0                       # Header: padding
55906b777aSPavel Labath	.long	1                       # Header: compilation unit count
56906b777aSPavel Labath	.long	0                       # Header: local type unit count
57906b777aSPavel Labath	.long	0                       # Header: foreign type unit count
58906b777aSPavel Labath	.long	0                       # Header: bucket count
59906b777aSPavel Labath	.long	1                       # Header: name count
60906b777aSPavel Labath	.long	.Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
61906b777aSPavel Labath	.long	0                       # Header: augmentation length
62906b777aSPavel Labath	.long	.Lcu_begin0             # Compilation unit 0
63906b777aSPavel Labath	.long	.Lstring_foo            # String in Bucket 1: foo
64906b777aSPavel Labath	.long	.Lnames0-.Lnames_entries0 # Offset in Bucket 1
65906b777aSPavel Labath.Lnames_abbrev_start0:
66906b777aSPavel Labath	.byte	46                      # Abbrev code
67906b777aSPavel Labath	.byte	46                      # DW_TAG_subprogram
68906b777aSPavel Labath	.byte	3                       # DW_IDX_die_offset
69*79cd942cSPavel Labath	.byte	19                      # DW_FORM_ref4
70906b777aSPavel Labath	.byte	0                       # End of abbrev
71906b777aSPavel Labath	.byte	0                       # End of abbrev
72906b777aSPavel Labath	.byte	0                       # End of abbrev list
73906b777aSPavel Labath.Lnames_abbrev_end0:
74906b777aSPavel Labath.Lnames_entries0:
75906b777aSPavel Labath.Lnames0:
76906b777aSPavel Labath	.byte	46                      # Abbrev code
77906b777aSPavel Labath	.long	.Ldie_foo-.Lcu_begin0   # DW_IDX_die_offset
78906b777aSPavel Labath	.long	0                       # End of list: foo
79906b777aSPavel Labath	.p2align	2
80906b777aSPavel Labath.Lnames_end0:
81