1 ## This test checks that size of DW_AT_location attribute
2 ## of the DW_FORM_block1 form is correctly written to the
5 # RUN: yaml2obj %s -o %t.o
6 # RUN: echo '---' > %t2.map
7 # RUN: echo "triple: 'x86_64-apple-darwin'" >> %t2.map
8 # RUN: echo 'objects:' >> %t2.map
9 # RUN: echo " - filename: '%t.o'" >> %t2.map
10 # RUN: echo ' symbols:' >> %t2.map
11 # RUN: echo ' - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t2.map
12 # RUN: echo '...' >> %t2.map
13 # RUN: dsymutil -y %t2.map -f -o - | llvm-dwarfdump -a --verbose - | FileCheck %s
14 # RUN: dsymutil --linker llvm -y %t2.map -f -o - | llvm-dwarfdump -a --verbose - | FileCheck %s
16 # CHECK: file format Mach-O 64-bit x86-64
17 # CHECK: .debug_info contents:
18 # CHECK: Compile Unit:
19 # CHECK: DW_TAG_compile_unit
20 # CHECK: DW_AT_name{{.*}}"CU1"
21 # CHECK: DW_TAG_variable
22 # CHECK: DW_AT_name {{.*}}"var1"
23 # CHECK: DW_AT_type {{.*}}"class1"
24 # CHECK: DW_AT_location [DW_FORM_block1] (DW_OP_const8u 0x{{.*}}, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address)
25 # CHECK: DW_TAG_variable
26 # CHECK: DW_AT_name {{.*}}"var2"
27 # CHECK: DW_AT_type {{.*}}"class1"
28 # CHECK: DW_AT_location [DW_FORM_block] (DW_OP_const8u 0x{{.*}}, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address, DW_OP_const8u 0x2000, DW_OP_form_tls_address)
29 # CHECK: DW_TAG_variable
30 # CHECK: DW_AT_name {{.*}}"var3"
31 # CHECK: DW_AT_type {{.*}}"class1"
38 cpusubtype: 0x00000003
57 - sectname: __debug_abbrev
59 addr: 0x000000000000000F
69 - sectname: __debug_info
71 addr: 0x000000000000100
123 - Tag: DW_TAG_compile_unit
124 Children: DW_CHILDREN_yes
126 - Attribute: DW_AT_producer
128 - Attribute: DW_AT_language
130 - Attribute: DW_AT_name
132 - Tag: DW_TAG_class_type
133 Children: DW_CHILDREN_no
135 - Attribute: DW_AT_name
137 - Tag: DW_TAG_variable
138 Children: DW_CHILDREN_no
140 - Attribute: DW_AT_name
142 - Attribute: DW_AT_const_value
144 - Attribute: DW_AT_type
146 - Attribute: DW_AT_location
148 - Tag: DW_TAG_variable
149 Children: DW_CHILDREN_no
151 - Attribute: DW_AT_name
153 - Attribute: DW_AT_const_value
155 - Attribute: DW_AT_type
157 - Attribute: DW_AT_location
159 - Tag: DW_TAG_variable
160 Children: DW_CHILDREN_no
162 - Attribute: DW_AT_name
164 - Attribute: DW_AT_const_value
166 - Attribute: DW_AT_type