blob: 6ed645325fc57ae07afc50fb13359a1993ad8cea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
## This test checks that debug info related to deleted code (marked with
## default tombstone value) is removed.
# RUN: yaml2obj %s -o %t.o
# RUN: llvm-dwarfutil --no-odr %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
# RUN: llvm-dwarfutil --no-odr --linker classic %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
# RUN: llvm-dwarfutil --no-odr --linker parallel %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
# RUN: llvm-dwarfutil --no-odr --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
# RUN: llvm-dwarfutil --no-odr --no-garbage-collection --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
# RUN: llvm-dwarfutil --no-odr --garbage-collection --no-garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-NOGC
# RUN: llvm-dwarfutil --no-odr --linker parallel --garbage-collection --no-garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-NOGC
# RUN: llvm-dwarfutil --no-odr %t.o --tombstone=universal - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
# RUN: llvm-dwarfutil --no-odr --linker parallel %t.o --tombstone=universal - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,CHECK-GC
# CHECK: DW_TAG_compile_unit
# CHECK: DW_AT_name{{.*}}"CU1"
# CHECK: DW_TAG_class_type
# CHECK: DW_AT_name{{.*}}"class1"
# CHECK-GC-NOT: DW_TAG_class_type
# CHECK-GC-NOT: "class2"
# CHECK-GC-NOT: "class3"
# CHECK-NOGC: DW_TAG_class_type
# CHECK-NOGC: "class2"
# CHECK-NOGC: "class3"
# CHECK: DW_TAG_subprogram
# CHECK: DW_AT_name{{.*}}"foo1"
# CHECK: DW_AT_low_pc{{.*}}0x0000000000001000
# CHECK: DW_AT_high_pc{{.*}}0x0000000000001010
# CHECK: DW_AT_type{{.*}}"class1"
# CHECK-GC-NOT: DW_TAG_subprogram
# CHECK-GC-NOT: "foo2"
# CHECK-NOGC: DW_TAG_subprogram
# CHECK-NOGC: "foo2"
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1000
Size: 0x1b
DWARF:
debug_abbrev:
- Table:
- Tag: DW_TAG_compile_unit
Children: DW_CHILDREN_yes
Attributes:
- Attribute: DW_AT_producer
Form: DW_FORM_string
- Attribute: DW_AT_language
Form: DW_FORM_data2
- Attribute: DW_AT_name
Form: DW_FORM_string
- Attribute: DW_AT_low_pc
Form: DW_FORM_addr
- Attribute: DW_AT_high_pc
Form: DW_FORM_data8
- Tag: DW_TAG_subprogram
Children: DW_CHILDREN_no
Attributes:
- Attribute: DW_AT_name
Form: DW_FORM_string
- Attribute: DW_AT_low_pc
Form: DW_FORM_addr
- Attribute: DW_AT_high_pc
Form: DW_FORM_data8
- Attribute: DW_AT_type
Form: DW_FORM_ref4
- Tag: DW_TAG_class_type
Children: DW_CHILDREN_yes
Attributes:
- Attribute: DW_AT_name
Form: DW_FORM_string
- Tag: DW_TAG_member
Children: DW_CHILDREN_no
Attributes:
- Attribute: DW_AT_type
Form: DW_FORM_ref4
- Attribute: DW_AT_name
Form: DW_FORM_string
- Tag: DW_TAG_class_type
Children: DW_CHILDREN_no
Attributes:
- Attribute: DW_AT_name
Form: DW_FORM_string
- Attribute: DW_AT_declaration
Form: DW_FORM_flag_present
- Tag: DW_TAG_class_type
Children: DW_CHILDREN_yes
Attributes:
- Attribute: DW_AT_name
Form: DW_FORM_string
- Attribute: DW_AT_declaration
Form: DW_FORM_flag_present
- Tag: DW_TAG_template_type_parameter
Children: DW_CHILDREN_no
Attributes:
- Attribute: DW_AT_type
Form: DW_FORM_ref4
- Tag: DW_TAG_base_type
Children: DW_CHILDREN_no
Attributes:
- Attribute: DW_AT_name
Form: DW_FORM_string
debug_info:
- Version: 4
Entries:
- AbbrCode: 1
Values:
- CStr: by_hand
- Value: 0x04
- CStr: CU1
- Value: 0x1000
- Value: 0x1b
- AbbrCode: 3
Values:
- CStr: class1
- AbbrCode: 4
Values:
- Value: 0x0000006c
- CStr: member1
- AbbrCode: 0
- AbbrCode: 3
Values:
- CStr: class2
- AbbrCode: 4
Values:
- Value: 0x0000006c
- CStr: member1
- AbbrCode: 0
- AbbrCode: 3
Values:
- CStr: class3
- AbbrCode: 4
Values:
- Value: 0x0000006c
- CStr: member1
- AbbrCode: 0
- AbbrCode: 8
Values:
- CStr: int
- AbbrCode: 2
Values:
- CStr: foo1
- Value: 0x1000
- Value: 0x10
- Value: 0x0000002a
- AbbrCode: 2
Values:
- CStr: foo2
- Value: 0x0
- Value: 0x100
- Value: 0x00000040
- AbbrCode: 0
...
|