11 # clang -O2 -gdwarf-4 -S a.cpp -o a4.s
13 # RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o %t.o
14 # RUN: llvm-dwarfdump -debug-info -name g %t.o | FileCheck %s
16 # CHECK: DW_TAG_member
17 # CHECK: DW_AT_name ("g")
18 # CHECK: DW_AT_data_member_location (0x4000)
20 .section __TEXT,__text,regular,pure_instructions
21 .macosx_version_min 10, 14
22 .globl __Z3foov ## -- Begin function _Z3foov
26 .file 1 "/private/tmp" "a.cpp"
27 .loc 1 5 0 ## a.cpp:5:0
31 .cfi_def_cfa_offset 16
34 .cfi_def_cfa_register %rbp
40 .loc 1 6 12 prologue_end ## a.cpp:6:12
41 movl $
16385, %edi
## imm = 0x4001
44 ##DEBUG_VALUE: foo:E <- $rax
45 .loc 1 7 10 ## a.cpp:7:10
46 movl $
16385, %edx
## imm = 0x4001
51 .loc 1 8 1 ## a.cpp:8:1
61 .section __DWARF,__debug_str,regular,debug
63 .asciz "clang version 9.0.0 (git@github.com:llvm/llvm-project.git 10de39548976ae224709acdc1c337e33cf12f3c0)" ## string offset=0
64 .asciz "a.cpp" ## string offset=100
65 .asciz "/private/tmp" ## string offset=106
66 .asciz "foo" ## string offset=119
67 .asciz "_Z3foov" ## string offset=123
68 .asciz "e" ## string offset=131
69 .asciz "f" ## string offset=133
70 .asciz "char" ## string offset=135
71 .asciz "__ARRAY_SIZE_TYPE__" ## string offset=140
72 .asciz "g" ## string offset=160
73 .asciz "E" ## string offset=162
74 .section __DWARF,__debug_loc,regular,debug
77 .set Lset0, Ltmp1-Lfunc_begin0
79 .set Lset1, Ltmp2-Lfunc_begin0
81 .short 1 ## Loc expr size
82 .byte 80 ## DW_OP_reg0
85 .section __DWARF,__debug_abbrev,regular,debug
87 .byte 1 ## Abbreviation Code
88 .byte 17 ## DW_TAG_compile_unit
89 .byte 1 ## DW_CHILDREN_yes
90 .byte 37 ## DW_AT_producer
91 .byte 14 ## DW_FORM_strp
92 .byte 19 ## DW_AT_language
93 .byte 5 ## DW_FORM_data2
95 .byte 14 ## DW_FORM_strp
96 .byte 16 ## DW_AT_stmt_list
97 .byte 23 ## DW_FORM_sec_offset
98 .byte 27 ## DW_AT_comp_dir
99 .byte 14 ## DW_FORM_strp
100 .ascii "\264B" ## DW_AT_GNU_pubnames
101 .byte 25 ## DW_FORM_flag_present
102 .ascii "\341\177" ## DW_AT_APPLE_optimized
103 .byte 25 ## DW_FORM_flag_present
104 .byte 17 ## DW_AT_low_pc
105 .byte 1 ## DW_FORM_addr
106 .byte 18 ## DW_AT_high_pc
107 .byte 6 ## DW_FORM_data4
110 .byte 2 ## Abbreviation Code
111 .byte 46 ## DW_TAG_subprogram
112 .byte 1 ## DW_CHILDREN_yes
113 .byte 17 ## DW_AT_low_pc
114 .byte 1 ## DW_FORM_addr
115 .byte 18 ## DW_AT_high_pc
116 .byte 6 ## DW_FORM_data4
117 .byte 64 ## DW_AT_frame_base
118 .byte 24 ## DW_FORM_exprloc
119 .byte 122 ## DW_AT_call_all_calls
120 .byte 25 ## DW_FORM_flag_present
121 .byte 110 ## DW_AT_linkage_name
122 .byte 14 ## DW_FORM_strp
123 .byte 3 ## DW_AT_name
124 .byte 14 ## DW_FORM_strp
125 .byte 58 ## DW_AT_decl_file
126 .byte 11 ## DW_FORM_data1
127 .byte 59 ## DW_AT_decl_line
128 .byte 11 ## DW_FORM_data1
129 .byte 73 ## DW_AT_type
130 .byte 19 ## DW_FORM_ref4
131 .byte 63 ## DW_AT_external
132 .byte 25 ## DW_FORM_flag_present
133 .ascii "\341\177" ## DW_AT_APPLE_optimized
134 .byte 25 ## DW_FORM_flag_present
137 .byte 3 ## Abbreviation Code
138 .byte 52 ## DW_TAG_variable
139 .byte 0 ## DW_CHILDREN_no
140 .byte 2 ## DW_AT_location
141 .byte 23 ## DW_FORM_sec_offset
142 .byte 3 ## DW_AT_name
143 .byte 14 ## DW_FORM_strp
144 .byte 58 ## DW_AT_decl_file
145 .byte 11 ## DW_FORM_data1
146 .byte 59 ## DW_AT_decl_line
147 .byte 11 ## DW_FORM_data1
148 .byte 73 ## DW_AT_type
149 .byte 19 ## DW_FORM_ref4
152 .byte 4 ## Abbreviation Code
153 .byte 19 ## DW_TAG_structure_type
154 .byte 1 ## DW_CHILDREN_yes
155 .byte 54 ## DW_AT_calling_convention
156 .byte 11 ## DW_FORM_data1
157 .byte 3 ## DW_AT_name
158 .byte 14 ## DW_FORM_strp
159 .byte 11 ## DW_AT_byte_size
160 .byte 5 ## DW_FORM_data2
161 .byte 58 ## DW_AT_decl_file
162 .byte 11 ## DW_FORM_data1
163 .byte 59 ## DW_AT_decl_line
164 .byte 11 ## DW_FORM_data1
167 .byte 5 ## Abbreviation Code
168 .byte 13 ## DW_TAG_member
169 .byte 0 ## DW_CHILDREN_no
170 .byte 3 ## DW_AT_name
171 .byte 14 ## DW_FORM_strp
172 .byte 73 ## DW_AT_type
173 .byte 19 ## DW_FORM_ref4
174 .byte 58 ## DW_AT_decl_file
175 .byte 11 ## DW_FORM_data1
176 .byte 59 ## DW_AT_decl_line
177 .byte 11 ## DW_FORM_data1
178 .byte 56 ## DW_AT_data_member_location
179 .byte 11 ## DW_FORM_data1
182 .byte 6 ## Abbreviation Code
183 .byte 13 ## DW_TAG_member
184 .byte 0 ## DW_CHILDREN_no
185 .byte 3 ## DW_AT_name
186 .byte 14 ## DW_FORM_strp
187 .byte 73 ## DW_AT_type
188 .byte 19 ## DW_FORM_ref4
189 .byte 58 ## DW_AT_decl_file
190 .byte 11 ## DW_FORM_data1
191 .byte 59 ## DW_AT_decl_line
192 .byte 11 ## DW_FORM_data1
193 .byte 56 ## DW_AT_data_member_location
194 .byte 5 ## DW_FORM_data2
197 .byte 7 ## Abbreviation Code
198 .byte 1 ## DW_TAG_array_type
199 .byte 1 ## DW_CHILDREN_yes
200 .byte 73 ## DW_AT_type
201 .byte 19 ## DW_FORM_ref4
204 .byte 8 ## Abbreviation Code
205 .byte 33 ## DW_TAG_subrange_type
206 .byte 0 ## DW_CHILDREN_no
207 .byte 73 ## DW_AT_type
208 .byte 19 ## DW_FORM_ref4
209 .byte 55 ## DW_AT_count
210 .byte 5 ## DW_FORM_data2
213 .byte 9 ## Abbreviation Code
214 .byte 36 ## DW_TAG_base_type
215 .byte 0 ## DW_CHILDREN_no
216 .byte 3 ## DW_AT_name
217 .byte 14 ## DW_FORM_strp
218 .byte 62 ## DW_AT_encoding
219 .byte 11 ## DW_FORM_data1
220 .byte 11 ## DW_AT_byte_size
221 .byte 11 ## DW_FORM_data1
224 .byte 10 ## Abbreviation Code
225 .byte 36 ## DW_TAG_base_type
226 .byte 0 ## DW_CHILDREN_no
227 .byte 3 ## DW_AT_name
228 .byte 14 ## DW_FORM_strp
229 .byte 11 ## DW_AT_byte_size
230 .byte 11 ## DW_FORM_data1
231 .byte 62 ## DW_AT_encoding
232 .byte 11 ## DW_FORM_data1
235 .byte 11 ## Abbreviation Code
236 .byte 15 ## DW_TAG_pointer_type
237 .byte 0 ## DW_CHILDREN_no
238 .byte 73 ## DW_AT_type
239 .byte 19 ## DW_FORM_ref4
243 .section __DWARF,__debug_info,regular,debug
246 .set Lset2, Ldebug_info_end0-Ldebug_info_start0 ## Length of Unit
249 .short 4 ## DWARF version number
250 .set Lset3, Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section
252 .byte 8 ## Address Size (in bytes)
253 .byte 1 ## Abbrev [1] 0xb:0x91 DW_TAG_compile_unit
254 .long 0 ## DW_AT_producer
255 .short 4 ## DW_AT_language
256 .long 100 ## DW_AT_name
257 .set Lset4, Lline_table_start0-Lsection_line ## DW_AT_stmt_list
259 .long 106 ## DW_AT_comp_dir
260 ## DW_AT_GNU_pubnames
261 ## DW_AT_APPLE_optimized
262 .quad Lfunc_begin0 ## DW_AT_low_pc
263 .set Lset5, Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc
265 .byte 2 ## Abbrev [2] 0x2a:0x2d DW_TAG_subprogram
266 .quad Lfunc_begin0 ## DW_AT_low_pc
267 .set Lset6, Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc
269 .byte 1 ## DW_AT_frame_base
271 ## DW_AT_call_all_calls
272 .long 123 ## DW_AT_linkage_name
273 .long 119 ## DW_AT_name
274 .byte 1 ## DW_AT_decl_file
275 .byte 5 ## DW_AT_decl_line
276 .long 87 ## DW_AT_type
278 ## DW_AT_APPLE_optimized
279 .byte 3 ## Abbrev [3] 0x47:0xf DW_TAG_variable
280 .set Lset7, Ldebug_loc0-Lsection_debug_loc ## DW_AT_location
282 .long 162 ## DW_AT_name
283 .byte 1 ## DW_AT_decl_file
284 .byte 6 ## DW_AT_decl_line
285 .long 150 ## DW_AT_type
286 .byte 0 ## End Of Children Mark
287 .byte 4 ## Abbrev [4] 0x57:0x24 DW_TAG_structure_type
288 .byte 5 ## DW_AT_calling_convention
289 .long 131 ## DW_AT_name
290 .short 16385 ## DW_AT_byte_size
291 .byte 1 ## DW_AT_decl_file
292 .byte 1 ## DW_AT_decl_line
293 .byte 5 ## Abbrev [5] 0x61:0xc DW_TAG_member
294 .long 133 ## DW_AT_name
295 .long 123 ## DW_AT_type
296 .byte 1 ## DW_AT_decl_file
297 .byte 2 ## DW_AT_decl_line
298 .byte 0 ## DW_AT_data_member_location
299 .byte 6 ## Abbrev [6] 0x6d:0xd DW_TAG_member
300 .long 160 ## DW_AT_name
301 .long 136 ## DW_AT_type
302 .byte 1 ## DW_AT_decl_file
303 .byte 3 ## DW_AT_decl_line
304 .short 16384 ## DW_AT_data_member_location
305 .byte 0 ## End Of Children Mark
306 .byte 7 ## Abbrev [7] 0x7b:0xd DW_TAG_array_type
307 .long 136 ## DW_AT_type
308 .byte 8 ## Abbrev [8] 0x80:0x7 DW_TAG_subrange_type
309 .long 143 ## DW_AT_type
310 .short 16384 ## DW_AT_count
311 .byte 0 ## End Of Children Mark
312 .byte 9 ## Abbrev [9] 0x88:0x7 DW_TAG_base_type
313 .long 135 ## DW_AT_name
314 .byte 6 ## DW_AT_encoding
315 .byte 1 ## DW_AT_byte_size
316 .byte 10 ## Abbrev [10] 0x8f:0x7 DW_TAG_base_type
317 .long 140 ## DW_AT_name
318 .byte 8 ## DW_AT_byte_size
319 .byte 7 ## DW_AT_encoding
320 .byte 11 ## Abbrev [11] 0x96:0x5 DW_TAG_pointer_type
321 .long 87 ## DW_AT_type
322 .byte 0 ## End Of Children Mark
324 .section __DWARF,__debug_macinfo,regular,debug
326 .byte 0 ## End Of Macro List Mark
328 .subsections_via_symbols
329 .section __DWARF,__debug_line,regular,debug