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 @ {{.*}} (DW_TAG_namespace) with name namesp missing.
4 # CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_variable) with name var_block_addr missing.
5 # CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_namespace) with name (anonymous namespace) missing.
6 # CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_variable) with name var_loc_addr missing.
7 # CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_variable) with name var_loc_tls missing.
8 # CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_variable) with name var_loc_gnu_tls missing.
9 # CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_subprogram) with name fun_name missing.
10 # CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_subprogram) with name _Z8fun_name missing.
11 # CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_inlined_subroutine) with name fun_inline missing.
12 # CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_label) with name label missing.
14 .section .debug_loc,"",@progbits
18 .short .Lloc0_end-.Lloc0_start # Loc expr size
26 .section .debug_abbrev,"",@progbits
27 .byte 1 # Abbreviation Code
28 .byte 17 # DW_TAG_compile_unit
29 .byte 1 # DW_CHILDREN_yes
30 .byte 37 # DW_AT_producer
31 .byte 8 # DW_FORM_string
32 .byte 17 # DW_AT_low_pc
33 .byte 1 # DW_FORM_addr
34 .byte 18 # DW_AT_high_pc
35 .byte 6 # DW_FORM_data4
39 .byte 2 # Abbreviation Code
40 .byte 52 # DW_TAG_variable
41 .byte 0 # DW_CHILDREN_no
43 .byte 8 # DW_FORM_string
44 .byte 2 # DW_AT_location
45 .byte 24 # DW_FORM_exprloc
49 .byte 3 # Abbreviation Code
50 .byte 46 # DW_TAG_subprogram
51 .byte 1 # DW_CHILDREN_yes
53 .byte 8 # DW_FORM_string
54 .byte 110 # DW_AT_linkage_name
55 .byte 8 # DW_FORM_string
56 .byte 82 # DW_AT_entry_pc
57 .byte 1 # DW_FORM_addr
61 .byte 4 # Abbreviation Code
62 .byte 57 # DW_TAG_namespace
63 .byte 1 # DW_CHILDREN_yes
65 .byte 8 # DW_FORM_string
69 .byte 5 # Abbreviation Code
70 .byte 52 # DW_TAG_variable
71 .byte 0 # DW_CHILDREN_no
73 .byte 8 # DW_FORM_string
74 .byte 2 # DW_AT_location
75 .byte 23 # DW_FORM_sec_offset
79 .byte 6 # Abbreviation Code
80 .byte 57 # DW_TAG_namespace
81 .byte 1 # DW_CHILDREN_yes
85 .byte 7 # Abbreviation Code
86 .byte 29 # DW_TAG_inlined_subroutine
87 .byte 0 # DW_CHILDREN_no
89 .byte 8 # DW_FORM_string
90 .byte 17 # DW_AT_low_pc
91 .byte 1 # DW_FORM_addr
92 .byte 18 # DW_AT_high_pc
93 .byte 1 # DW_FORM_addr
97 .byte 8 # Abbreviation Code
98 .byte 10 # DW_TAG_label
99 .byte 0 # DW_CHILDREN_no
101 .byte 8 # DW_FORM_string
102 .byte 82 # DW_AT_entry_pc
103 .byte 1 # DW_FORM_addr
108 .section .debug_info,"",@progbits
111 .long .Lcu_end0-.Lcu_start0 # Length of Unit
113 .short 4 # DWARF version number
114 .long .debug_abbrev # Offset Into Abbrev. Section
115 .byte 8 # Address Size (in bytes)
116 .byte 1 # Abbrev [1] DW_TAG_compile_unit
117 .asciz "hand-written DWARF" # DW_AT_producer
118 .quad 0x0 # DW_AT_low_pc
119 .long 0x100 # DW_AT_high_pc
121 .byte 4 # Abbrev [4] DW_TAG_namespace
122 .asciz "namesp" # DW_AT_name
123 .byte 2 # Abbrev [2] DW_TAG_variable
124 .asciz "var_block_addr" # DW_AT_name
125 .byte 9 # DW_AT_location
128 .byte 0 # End Of Children Mark
130 .byte 6 # Abbrev [6] DW_TAG_namespace
131 .byte 5 # Abbrev [5] DW_TAG_variable
132 .asciz "var_loc_addr" # DW_AT_name
133 .long .Ldebug_loc0 # DW_AT_location
134 .byte 0 # End Of Children Mark
136 .byte 2 # Abbrev [2] DW_TAG_variable
137 .asciz "var_loc_tls" # DW_AT_name
138 .byte 1 # DW_AT_location
139 .byte 0x9b # DW_OP_form_tls_address
141 .byte 2 # Abbrev [2] DW_TAG_variable
142 .asciz "var_loc_gnu_tls" # DW_AT_name
143 .byte 1 # DW_AT_location
144 .byte 0xe0 # DW_OP_GNU_push_tls_address
146 .byte 3 # Abbrev [3] DW_TAG_subprogram
147 .asciz "fun_name" # DW_AT_name
148 .asciz "_Z8fun_name" # DW_AT_linkage_name
149 .quad 0x47 # DW_AT_entry_pc
150 .byte 7 # Abbrev [7] DW_TAG_inlined_subroutine
151 .asciz "fun_inline" # DW_AT_name
152 .quad 0x48 # DW_AT_low_pc
153 .quad 0x49 # DW_AT_high_pc
154 .byte 8 # Abbrev [8] DW_TAG_label
155 .asciz "label" # DW_AT_name
156 .quad 0x4a # DW_AT_entry_pc
157 .byte 0 # End Of Children Mark
159 .byte 0 # End Of Children Mark
162 .section .debug_names,"",@progbits
163 .long .Lnames_end0-.Lnames_start0 # Header: contribution length
165 .short 5 # Header: version
166 .short 0 # Header: padding
167 .long 1 # Header: compilation unit count
168 .long 0 # Header: local type unit count
169 .long 0 # Header: foreign type unit count
170 .long 0 # Header: bucket count
171 .long 0 # Header: name count
172 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
173 .long 0 # Header: augmentation length
174 .long .Lcu_begin0 # Compilation unit 0
175 .Lnames_abbrev_start0:
176 .byte 0 # End of abbrev list