1 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj -o - | not llvm-dwarfdump -verify - | FileCheck %s
3 # CHECK: error: Name Index @ 0x0: Entry for DIE @ 0x10 (DW_TAG_namespace) with name namesp missing.
4 # CHECK: error: Name Index @ 0x0: Entry for DIE @ 0x15 (DW_TAG_variable) with name var_block_addr missing.
5 # CHECK: error: Name Index @ 0x0: Entry for DIE @ 0x25 (DW_TAG_namespace) with name (anonymous namespace) missing.
6 # CHECK: error: Name Index @ 0x0: Entry for DIE @ 0x26 (DW_TAG_variable) with name var_loc_addr missing.
7 # CHECK: error: Name Index @ 0x0: Entry for DIE @ 0x30 (DW_TAG_variable) with name var_loc_tls missing.
8 # CHECK: error: Name Index @ 0x0: Entry for DIE @ 0x37 (DW_TAG_variable) with name var_loc_gnu_tls missing.
9 # CHECK: error: Name Index @ 0x0: Entry for DIE @ 0x3e (DW_TAG_subprogram) with name fun_name missing.
10 # CHECK: error: Name Index @ 0x0: Entry for DIE @ 0x3e (DW_TAG_subprogram) with name _Z8fun_name missing.
11 # CHECK: error: Name Index @ 0x0: Entry for DIE @ 0x4f (DW_TAG_inlined_subroutine) with name fun_inline missing.
12 # CHECK: error: Name Index @ 0x0: Entry for DIE @ 0x64 (DW_TAG_label) with name label missing.
14 .section .debug_str,"MS",@progbits,1
16 .asciz "hand-written DWARF"
17 .Lname_var_block_addr:
18 .asciz "var_block_addr"
23 .Lname_var_loc_gnu_tls:
24 .asciz "var_loc_gnu_tls"
36 .section .debug_loc,"",@progbits
40 .short .Lloc0_end-.Lloc0_start # Loc expr size
48 .section .debug_abbrev,"",@progbits
49 .byte 1 # Abbreviation Code
50 .byte 17 # DW_TAG_compile_unit
51 .byte 1 # DW_CHILDREN_yes
52 .byte 37 # DW_AT_producer
53 .byte 14 # DW_FORM_strp
57 .byte 2 # Abbreviation Code
58 .byte 52 # DW_TAG_variable
59 .byte 0 # DW_CHILDREN_no
61 .byte 14 # DW_FORM_strp
62 .byte 2 # DW_AT_location
63 .byte 24 # DW_FORM_exprloc
67 .byte 3 # Abbreviation Code
68 .byte 46 # DW_TAG_subprogram
69 .byte 1 # DW_CHILDREN_yes
71 .byte 14 # DW_FORM_strp
72 .byte 110 # DW_AT_linkage_name
73 .byte 14 # DW_FORM_strp
74 .byte 82 # DW_AT_entry_pc
75 .byte 1 # DW_FORM_addr
79 .byte 4 # Abbreviation Code
80 .byte 57 # DW_TAG_namespace
81 .byte 1 # DW_CHILDREN_yes
83 .byte 14 # DW_FORM_strp
87 .byte 5 # Abbreviation Code
88 .byte 52 # DW_TAG_variable
89 .byte 0 # DW_CHILDREN_no
91 .byte 14 # DW_FORM_strp
92 .byte 2 # DW_AT_location
93 .byte 23 # DW_FORM_sec_offset
97 .byte 6 # Abbreviation Code
98 .byte 57 # DW_TAG_namespace
99 .byte 1 # DW_CHILDREN_yes
103 .byte 7 # Abbreviation Code
104 .byte 29 # DW_TAG_inlined_subroutine
105 .byte 0 # DW_CHILDREN_no
107 .byte 14 # DW_FORM_strp
108 .byte 17 # DW_AT_low_pc
109 .byte 1 # DW_FORM_addr
110 .byte 18 # DW_AT_high_pc
111 .byte 1 # DW_FORM_addr
115 .byte 8 # Abbreviation Code
116 .byte 10 # DW_TAG_label
117 .byte 0 # DW_CHILDREN_no
119 .byte 14 # DW_FORM_strp
120 .byte 82 # DW_AT_entry_pc
121 .byte 1 # DW_FORM_addr
126 .section .debug_info,"",@progbits
128 .long .Lcu_end0-.Lcu_start0 # Length of Unit
130 .short 4 # DWARF version number
131 .long .debug_abbrev # Offset Into Abbrev. Section
132 .byte 8 # Address Size (in bytes)
133 .byte 1 # Abbrev [1] DW_TAG_compile_unit
134 .long .Linfo_producer # DW_AT_producer
136 .byte 4 # Abbrev [4] DW_TAG_namespace
137 .long .Lnamespace # DW_AT_name
138 .byte 2 # Abbrev [2] DW_TAG_variable
139 .long .Lname_var_block_addr # DW_AT_name
140 .byte 9 # DW_AT_location
143 .byte 0 # End Of Children Mark
145 .byte 6 # Abbrev [6] DW_TAG_namespace
146 .byte 5 # Abbrev [5] DW_TAG_variable
147 .long .Lname_var_loc_addr # DW_AT_name
148 .long .Ldebug_loc0 # DW_AT_location
149 .byte 0 # End Of Children Mark
151 .byte 2 # Abbrev [2] DW_TAG_variable
152 .long .Lname_var_loc_tls # DW_AT_name
153 .byte 1 # DW_AT_location
154 .byte 0x9b # DW_OP_form_tls_address
156 .byte 2 # Abbrev [2] DW_TAG_variable
157 .long .Lname_var_loc_gnu_tls # DW_AT_name
158 .byte 1 # DW_AT_location
159 .byte 0xe0 # DW_OP_GNU_push_tls_address
161 .byte 3 # Abbrev [3] DW_TAG_subprogram
162 .long .Lname_fun_name # DW_AT_name
163 .long .Lname_fun_link_name # DW_AT_linkage_name
164 .quad 0x47 # DW_AT_entry_pc
165 .byte 7 # Abbrev [7] DW_TAG_inlined_subroutine
166 .long .Lname_fun_inline # DW_AT_name
167 .quad 0x48 # DW_AT_low_pc
168 .quad 0x49 # DW_AT_high_pc
169 .byte 8 # Abbrev [8] DW_TAG_label
170 .long .Lname_label # DW_AT_name
171 .quad 0x4a # DW_AT_entry_pc
172 .byte 0 # End Of Children Mark
174 .byte 0 # End Of Children Mark
177 .section .debug_names,"",@progbits
178 .long .Lnames_end0-.Lnames_start0 # Header: contribution length
180 .short 5 # Header: version
181 .short 0 # Header: padding
182 .long 1 # Header: compilation unit count
183 .long 0 # Header: local type unit count
184 .long 0 # Header: foreign type unit count
185 .long 0 # Header: bucket count
186 .long 0 # Header: name count
187 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
188 .long 0 # Header: augmentation length
189 .long .Lcu_begin0 # Compilation unit 0
190 .Lnames_abbrev_start0:
191 .byte 0 # End of abbrev list