1 # RUN: yaml2obj %s -o %t.o
2 # RUN: echo '---' > %t2.map
3 # RUN: echo "triple: 'x86_64-apple-darwin'" >> %t2.map
4 # RUN: echo 'objects:' >> %t2.map
5 # RUN: echo " - filename: '%t.o'" >> %t2.map
6 # RUN: echo ' symbols:' >> %t2.map
7 # RUN: echo ' - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t2.map
8 # RUN: echo '...' >> %t2.map
9 # RUN: dsymutil --linker=llvm -y %t2.map -f -o - | llvm-dwarfdump -a - | FileCheck %s
11 ## This test checks debug info for the equally named structures from
12 ## different namespaces. The result should contain two variables which
13 ## reference different types("A::C1::I1 *const" and "B::C1::I1 *const")
15 # CHECK: file format Mach-O 64-bit x86-64
16 # CHECK: .debug_info contents:
17 # CHECK: Compile Unit:
18 # CHECK: DW_TAG_compile_unit
19 # CHECK: DW_AT_name{{.*}}"__artificial_type_unit"
21 # CHECK: 0x[[INT:[0-9a-f]*]]: DW_TAG_base_type
22 # CHECK: DW_AT_name{{.*}}"int"
24 # CHECK: DW_TAG_namespace{{.*[[:space:]].*}}DW_AT_name{{.*}}"A"
26 # CHECK: 0x[[A_C1:[0-9a-f]*]]: DW_TAG_structure_type
27 # CHECK: DW_AT_name{{.*}}"C1"
28 # CHECK: DW_TAG_member
29 # CHECK: DW_AT_type{{.*}}0x[[INT]] "int"
30 # CHECK: DW_AT_name{{.*}}"I1"
32 # CHECK: DW_TAG_namespace{{.*[[:space:]].*}}DW_AT_name{{.*}}"B"
34 # CHECK: 0x[[B_C1:[0-9a-f]*]]: DW_TAG_structure_type
35 # CHECK: DW_AT_name{{.*}}"C1"
36 # CHECK: DW_TAG_member
37 # CHECK: DW_AT_type{{.*}}0x[[INT]] "int"
38 # CHECK: DW_AT_name{{.*}}"I1"
40 # CHECK: 0x[[PTR_A_C1:[0-9a-f]*]]: DW_TAG_pointer_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[A_C1:[0-9a-f]*]] "A::C1"
42 # CHECK: 0x[[PTR_B_C1:[0-9a-f]*]]: DW_TAG_pointer_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[B_C1:[0-9a-f]*]] "B::C1"
44 # CHECK: 0x[[CONST_A_C1:[0-9a-f]*]]: DW_TAG_const_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[PTR_A_C1]] "A::C1 *"
46 # CHECK: 0x[[CONST_B_C1:[0-9a-f]*]]: DW_TAG_const_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[PTR_B_C1]] "B::C1 *"
48 # CHECK: DW_TAG_compile_unit
49 # CHECK: DW_TAG_variable
50 # CHECK: DW_AT_name{{.*}}"var1"
51 # CHECK: DW_AT_type{{.*}}0x00000000[[CONST_A_C1]] "A::C1 *const"
52 # CHECK: DW_TAG_variable
53 # CHECK: DW_AT_name{{.*}}"var2"
54 # CHECK: DW_AT_type{{.*}}0x00000000[[CONST_B_C1]] "B::C1 *const"
61 cpusubtype: 0x00000003
80 - sectname: __debug_abbrev
82 addr: 0x000000000000000F
92 - sectname: __debug_info
94 addr: 0x000000000000100
101 reserved1: 0x00000000
102 reserved2: 0x00000000
103 reserved3: 0x00000000
105 - address: 0x000001FC
133 - Tag: DW_TAG_compile_unit
134 Children: DW_CHILDREN_yes
136 - Attribute: DW_AT_producer
138 - Attribute: DW_AT_language
140 - Tag: DW_TAG_namespace
141 Children: DW_CHILDREN_yes
143 - Attribute: DW_AT_name
145 - Tag: DW_TAG_structure_type
146 Children: DW_CHILDREN_yes
148 - Attribute: DW_AT_name
151 Children: DW_CHILDREN_no
153 - Attribute: DW_AT_type
154 Form: DW_FORM_ref_addr
155 - Attribute: DW_AT_name
157 - Tag: DW_TAG_base_type
158 Children: DW_CHILDREN_no
160 - Attribute: DW_AT_name
162 - Tag: DW_TAG_pointer_type
163 Children: DW_CHILDREN_no
165 - Attribute: DW_AT_type
166 Form: DW_FORM_ref_addr
167 - Tag: DW_TAG_const_type
168 Children: DW_CHILDREN_no
170 - Attribute: DW_AT_type
171 Form: DW_FORM_ref_addr
172 - Tag: DW_TAG_variable
173 Children: DW_CHILDREN_no
175 - Attribute: DW_AT_name
177 - Attribute: DW_AT_const_value
179 - Attribute: DW_AT_type
180 Form: DW_FORM_ref_addr