11 # clang -O2 -gdwarf-2 -S a.cpp -o a2.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 (DW_OP_plus_uconst 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 6 ## DW_FORM_data4
98 .byte 27 ## DW_AT_comp_dir
99 .byte 14 ## DW_FORM_strp
100 .ascii "\264B" ## DW_AT_GNU_pubnames
101 .byte 12 ## DW_FORM_flag
102 .ascii "\341\177" ## DW_AT_APPLE_optimized
103 .byte 12 ## DW_FORM_flag
104 .byte 17 ## DW_AT_low_pc
105 .byte 1 ## DW_FORM_addr
106 .byte 18 ## DW_AT_high_pc
107 .byte 1 ## DW_FORM_addr
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 1 ## DW_FORM_addr
117 .byte 64 ## DW_AT_frame_base
118 .byte 10 ## DW_FORM_block1
119 .ascii "\207@" ## DW_AT_MIPS_linkage_name
120 .byte 14 ## DW_FORM_strp
121 .byte 3 ## DW_AT_name
122 .byte 14 ## DW_FORM_strp
123 .byte 58 ## DW_AT_decl_file
124 .byte 11 ## DW_FORM_data1
125 .byte 59 ## DW_AT_decl_line
126 .byte 11 ## DW_FORM_data1
127 .byte 73 ## DW_AT_type
128 .byte 19 ## DW_FORM_ref4
129 .byte 63 ## DW_AT_external
130 .byte 12 ## DW_FORM_flag
131 .ascii "\341\177" ## DW_AT_APPLE_optimized
132 .byte 12 ## DW_FORM_flag
135 .byte 3 ## Abbreviation Code
136 .byte 52 ## DW_TAG_variable
137 .byte 0 ## DW_CHILDREN_no
138 .byte 2 ## DW_AT_location
139 .byte 6 ## DW_FORM_data4
140 .byte 3 ## DW_AT_name
141 .byte 14 ## DW_FORM_strp
142 .byte 58 ## DW_AT_decl_file
143 .byte 11 ## DW_FORM_data1
144 .byte 59 ## DW_AT_decl_line
145 .byte 11 ## DW_FORM_data1
146 .byte 73 ## DW_AT_type
147 .byte 19 ## DW_FORM_ref4
150 .byte 4 ## Abbreviation Code
151 .byte 19 ## DW_TAG_structure_type
152 .byte 1 ## DW_CHILDREN_yes
153 .byte 54 ## DW_AT_calling_convention
154 .byte 11 ## DW_FORM_data1
155 .byte 3 ## DW_AT_name
156 .byte 14 ## DW_FORM_strp
157 .byte 11 ## DW_AT_byte_size
158 .byte 5 ## DW_FORM_data2
159 .byte 58 ## DW_AT_decl_file
160 .byte 11 ## DW_FORM_data1
161 .byte 59 ## DW_AT_decl_line
162 .byte 11 ## DW_FORM_data1
165 .byte 5 ## Abbreviation Code
166 .byte 13 ## DW_TAG_member
167 .byte 0 ## DW_CHILDREN_no
168 .byte 3 ## DW_AT_name
169 .byte 14 ## DW_FORM_strp
170 .byte 73 ## DW_AT_type
171 .byte 19 ## DW_FORM_ref4
172 .byte 58 ## DW_AT_decl_file
173 .byte 11 ## DW_FORM_data1
174 .byte 59 ## DW_AT_decl_line
175 .byte 11 ## DW_FORM_data1
176 .byte 56 ## DW_AT_data_member_location
177 .byte 10 ## DW_FORM_block1
180 .byte 6 ## Abbreviation Code
181 .byte 1 ## DW_TAG_array_type
182 .byte 1 ## DW_CHILDREN_yes
183 .byte 73 ## DW_AT_type
184 .byte 19 ## DW_FORM_ref4
187 .byte 7 ## Abbreviation Code
188 .byte 33 ## DW_TAG_subrange_type
189 .byte 0 ## DW_CHILDREN_no
190 .byte 73 ## DW_AT_type
191 .byte 19 ## DW_FORM_ref4
192 .byte 55 ## DW_AT_count
193 .byte 5 ## DW_FORM_data2
196 .byte 8 ## Abbreviation Code
197 .byte 36 ## DW_TAG_base_type
198 .byte 0 ## DW_CHILDREN_no
199 .byte 3 ## DW_AT_name
200 .byte 14 ## DW_FORM_strp
201 .byte 62 ## DW_AT_encoding
202 .byte 11 ## DW_FORM_data1
203 .byte 11 ## DW_AT_byte_size
204 .byte 11 ## DW_FORM_data1
207 .byte 9 ## Abbreviation Code
208 .byte 36 ## DW_TAG_base_type
209 .byte 0 ## DW_CHILDREN_no
210 .byte 3 ## DW_AT_name
211 .byte 14 ## DW_FORM_strp
212 .byte 11 ## DW_AT_byte_size
213 .byte 11 ## DW_FORM_data1
214 .byte 62 ## DW_AT_encoding
215 .byte 11 ## DW_FORM_data1
218 .byte 10 ## Abbreviation Code
219 .byte 15 ## DW_TAG_pointer_type
220 .byte 0 ## DW_CHILDREN_no
221 .byte 73 ## DW_AT_type
222 .byte 19 ## DW_FORM_ref4
226 .section __DWARF,__debug_info,regular,debug
229 .set Lset2, Ldebug_info_end0-Ldebug_info_start0 ## Length of Unit
232 .short 2 ## DWARF version number
233 .set Lset3, Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section
235 .byte 8 ## Address Size (in bytes)
236 .byte 1 ## Abbrev [1] 0xb:0xa2 DW_TAG_compile_unit
237 .long 0 ## DW_AT_producer
238 .short 4 ## DW_AT_language
239 .long 100 ## DW_AT_name
240 .set Lset4, Lline_table_start0-Lsection_line ## DW_AT_stmt_list
242 .long 106 ## DW_AT_comp_dir
243 .byte 1 ## DW_AT_GNU_pubnames
244 .byte 1 ## DW_AT_APPLE_optimized
245 .quad Lfunc_begin0 ## DW_AT_low_pc
246 .quad Lfunc_end0 ## DW_AT_high_pc
247 .byte 2 ## Abbrev [2] 0x30:0x33 DW_TAG_subprogram
248 .quad Lfunc_begin0 ## DW_AT_low_pc
249 .quad Lfunc_end0 ## DW_AT_high_pc
250 .byte 1 ## DW_AT_frame_base
252 .long 123 ## DW_AT_MIPS_linkage_name
253 .long 119 ## DW_AT_name
254 .byte 1 ## DW_AT_decl_file
255 .byte 5 ## DW_AT_decl_line
256 .long 99 ## DW_AT_type
257 .byte 1 ## DW_AT_external
258 .byte 1 ## DW_AT_APPLE_optimized
259 .byte 3 ## Abbrev [3] 0x53:0xf DW_TAG_variable
260 .set Lset5, Ldebug_loc0-Lsection_debug_loc ## DW_AT_location
262 .long 162 ## DW_AT_name
263 .byte 1 ## DW_AT_decl_file
264 .byte 6 ## DW_AT_decl_line
265 .long 167 ## DW_AT_type
266 .byte 0 ## End Of Children Mark
267 .byte 4 ## Abbrev [4] 0x63:0x29 DW_TAG_structure_type
268 .byte 5 ## DW_AT_calling_convention
269 .long 131 ## DW_AT_name
270 .short 16385 ## DW_AT_byte_size
271 .byte 1 ## DW_AT_decl_file
272 .byte 1 ## DW_AT_decl_line
273 .byte 5 ## Abbrev [5] 0x6d:0xe DW_TAG_member
274 .long 133 ## DW_AT_name
275 .long 140 ## DW_AT_type
276 .byte 1 ## DW_AT_decl_file
277 .byte 2 ## DW_AT_decl_line
278 .byte 2 ## DW_AT_data_member_location
281 .byte 5 ## Abbrev [5] 0x7b:0x10 DW_TAG_member
282 .long 160 ## DW_AT_name
283 .long 153 ## DW_AT_type
284 .byte 1 ## DW_AT_decl_file
285 .byte 3 ## DW_AT_decl_line
286 .byte 4 ## DW_AT_data_member_location
288 .ascii "\200\200\001"
289 .byte 0 ## End Of Children Mark
290 .byte 6 ## Abbrev [6] 0x8c:0xd DW_TAG_array_type
291 .long 153 ## DW_AT_type
292 .byte 7 ## Abbrev [7] 0x91:0x7 DW_TAG_subrange_type
293 .long 160 ## DW_AT_type
294 .short 16384 ## DW_AT_count
295 .byte 0 ## End Of Children Mark
296 .byte 8 ## Abbrev [8] 0x99:0x7 DW_TAG_base_type
297 .long 135 ## DW_AT_name
298 .byte 6 ## DW_AT_encoding
299 .byte 1 ## DW_AT_byte_size
300 .byte 9 ## Abbrev [9] 0xa0:0x7 DW_TAG_base_type
301 .long 140 ## DW_AT_name
302 .byte 8 ## DW_AT_byte_size
303 .byte 7 ## DW_AT_encoding
304 .byte 10 ## Abbrev [10] 0xa7:0x5 DW_TAG_pointer_type
305 .long 99 ## DW_AT_type
306 .byte 0 ## End Of Children Mark
308 .section __DWARF,__debug_macinfo,regular,debug
310 .byte 0 ## End Of Macro List Mark
312 .subsections_via_symbols
313 .section __DWARF,__debug_line,regular,debug