debug-vars-wide-chars.s
3.97 KB
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# RUN: mkdir -p %t/a
# RUN: cp %p/Inputs/wide-char.c %t/a/wide-char.c
# RUN: sed -e "s,SRC_COMPDIR,%/t/a,g" %s > %t.s
# RUN: llvm-mc -triple armv8a--none-eabi < %t.s -filetype=obj | \
# RUN: llvm-objdump - -d --debug-vars --source | \
# RUN: FileCheck %s --strict-whitespace
## The Chinese character in the source does not print correctly on Windows.
# UNSUPPORTED: system-windows
## Check that the --debug-vars option correctly aligns the variable display when
## the source code (printed by the -S option) includes East Asian wide
## characters.
# CHECK: 00000000 <foo>:
# CHECK-NEXT: ; return *喵; ┠─ 喵 = R0
# CHECK-NEXT: 0: 00 00 90 e5 ldr r0, [r0] ┻
# CHECK-NEXT: 4: 1e ff 2f e1 bx lr
.text
.syntax unified
.eabi_attribute 67, "2.09"
.eabi_attribute 6, 10
.eabi_attribute 7, 65
.eabi_attribute 8, 1
.eabi_attribute 9, 2
.fpu vfpv3
.eabi_attribute 34, 0
.eabi_attribute 17, 1
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 38, 1
.eabi_attribute 18, 4
.eabi_attribute 26, 2
.eabi_attribute 14, 0
.file "wide.c"
.globl foo
.p2align 2
.type foo,%function
.code 32
foo:
.Lfunc_begin0:
.file 1 "SRC_COMPDIR/wide-char.c"
.loc 1 1 0
.fnstart
.cfi_sections .debug_frame
.cfi_startproc
.loc 1 2 10 prologue_end
ldr r0, [r0]
.Ltmp0:
.loc 1 2 3 is_stmt 0
bx lr
.Ltmp1:
.Lfunc_end0:
.size foo, .Lfunc_end0-foo
.cfi_endproc
.cantunwind
.fnend
.section .debug_str,"MS",%progbits,1
.Linfo_string0:
.asciz "clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)"
.Linfo_string1:
.asciz "wide-char.c"
.Linfo_string2:
.asciz "SRC_COMPDIR"
.Linfo_string3:
.asciz "foo"
.Linfo_string4:
.asciz "int"
.Linfo_string5:
.asciz "\345\226\265"
.section .debug_loc,"",%progbits
.Ldebug_loc0:
.long .Lfunc_begin0-.Lfunc_begin0
.long .Ltmp0-.Lfunc_begin0
.short 1
.byte 80
.long 0
.long 0
.section .debug_abbrev,"",%progbits
.byte 1
.byte 17
.byte 1
.byte 37
.byte 14
.byte 19
.byte 5
.byte 3
.byte 14
.byte 16
.byte 23
.byte 27
.byte 14
.ascii "\264B"
.byte 25
.byte 17
.byte 1
.byte 18
.byte 6
.byte 0
.byte 0
.byte 2
.byte 46
.byte 1
.byte 17
.byte 1
.byte 18
.byte 6
.byte 64
.byte 24
.byte 3
.byte 14
.byte 58
.byte 11
.byte 59
.byte 11
.byte 39
.byte 25
.byte 73
.byte 19
.byte 63
.byte 25
.byte 0
.byte 0
.byte 3
.byte 5
.byte 0
.byte 2
.byte 23
.byte 3
.byte 14
.byte 58
.byte 11
.byte 59
.byte 11
.byte 73
.byte 19
.byte 0
.byte 0
.byte 4
.byte 36
.byte 0
.byte 3
.byte 14
.byte 62
.byte 11
.byte 11
.byte 11
.byte 0
.byte 0
.byte 5
.byte 15
.byte 0
.byte 73
.byte 19
.byte 0
.byte 0
.byte 0
.section .debug_info,"",%progbits
.Lcu_begin0:
.long 84
.short 4
.long .debug_abbrev
.byte 4
.byte 1
.long .Linfo_string0
.short 12
.long .Linfo_string1
.long .Lline_table_start0
.long .Linfo_string2
.long .Lfunc_begin0
.long .Lfunc_end0-.Lfunc_begin0
.byte 2
.long .Lfunc_begin0
.long .Lfunc_end0-.Lfunc_begin0
.byte 1
.byte 91
.long .Linfo_string3
.byte 1
.byte 1
.long 75
.byte 3
.long .Ldebug_loc0
.long .Linfo_string5
.byte 1
.byte 1
.long 82
.byte 0
.byte 4
.long .Linfo_string4
.byte 5
.byte 4
.byte 5
.long 75
.byte 0
.section .debug_ranges,"",%progbits
.section .debug_macinfo,"",%progbits
.Lcu_macro_begin0:
.byte 0
.section .debug_pubnames,"",%progbits
.long .LpubNames_end0-.LpubNames_begin0
.LpubNames_begin0:
.short 2
.long .Lcu_begin0
.long 88
.long 38
.asciz "foo"
.long 0
.LpubNames_end0:
.section .debug_pubtypes,"",%progbits
.long .LpubTypes_end0-.LpubTypes_begin0
.LpubTypes_begin0:
.short 2
.long .Lcu_begin0
.long 88
.long 75
.asciz "int"
.long 0
.LpubTypes_end0:
.ident "clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)"
.section ".note.GNU-stack","",%progbits
.eabi_attribute 30, 1
.section .debug_line,"",%progbits
.Lline_table_start0: