1# RUN: mkdir -p %t/a 2# RUN: cp %p/Inputs/wide-char.c %t/a/wide-char.c 3# RUN: sed -e "s,SRC_COMPDIR,%/t/a,g" %s > %t.s 4# RUN: llvm-mc -triple armv8a--none-eabi < %t.s -filetype=obj | \ 5# RUN: llvm-objdump - -d --debug-vars --source | \ 6# RUN: FileCheck %s --strict-whitespace 7 8## The Chinese character in the source does not print correctly on Windows. 9# UNSUPPORTED: system-windows 10 11## Check that the --debug-vars option correctly aligns the variable display when 12## the source code (printed by the -S option) includes East Asian wide 13## characters. 14 15# CHECK: 00000000 <foo>: 16# CHECK-NEXT: ; return *喵; ┠─ 喵 = R0 17# CHECK-NEXT: 0: e5900000 ldr r0, [r0] ┻ 18# CHECK-NEXT: 4: e12fff1e bx lr 19 20 .text 21 .syntax unified 22 .eabi_attribute 67, "2.09" 23 .eabi_attribute 6, 10 24 .eabi_attribute 7, 65 25 .eabi_attribute 8, 1 26 .eabi_attribute 9, 2 27 .fpu vfpv3 28 .eabi_attribute 34, 0 29 .eabi_attribute 17, 1 30 .eabi_attribute 20, 1 31 .eabi_attribute 21, 1 32 .eabi_attribute 23, 3 33 .eabi_attribute 24, 1 34 .eabi_attribute 25, 1 35 .eabi_attribute 38, 1 36 .eabi_attribute 18, 4 37 .eabi_attribute 26, 2 38 .eabi_attribute 14, 0 39 .file "wide.c" 40 .globl foo 41 .p2align 2 42 .type foo,%function 43 .code 32 44foo: 45.Lfunc_begin0: 46 .file 1 "SRC_COMPDIR/wide-char.c" 47 .loc 1 1 0 48 .fnstart 49 .cfi_sections .debug_frame 50 .cfi_startproc 51 .loc 1 2 10 prologue_end 52 ldr r0, [r0] 53.Ltmp0: 54 .loc 1 2 3 is_stmt 0 55 bx lr 56.Ltmp1: 57.Lfunc_end0: 58 .size foo, .Lfunc_end0-foo 59 .cfi_endproc 60 .cantunwind 61 .fnend 62 63 .section .debug_str,"MS",%progbits,1 64.Linfo_string0: 65 .asciz "clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)" 66.Linfo_string1: 67 .asciz "wide-char.c" 68.Linfo_string2: 69 .asciz "SRC_COMPDIR" 70.Linfo_string3: 71 .asciz "foo" 72.Linfo_string4: 73 .asciz "int" 74.Linfo_string5: 75 .asciz "\345\226\265" 76 .section .debug_loc,"",%progbits 77.Ldebug_loc0: 78 .long .Lfunc_begin0-.Lfunc_begin0 79 .long .Ltmp0-.Lfunc_begin0 80 .short 1 81 .byte 80 82 .long 0 83 .long 0 84 .section .debug_abbrev,"",%progbits 85 .byte 1 86 .byte 17 87 .byte 1 88 .byte 37 89 .byte 14 90 .byte 19 91 .byte 5 92 .byte 3 93 .byte 14 94 .byte 16 95 .byte 23 96 .byte 27 97 .byte 14 98 .ascii "\264B" 99 .byte 25 100 .byte 17 101 .byte 1 102 .byte 18 103 .byte 6 104 .byte 0 105 .byte 0 106 .byte 2 107 .byte 46 108 .byte 1 109 .byte 17 110 .byte 1 111 .byte 18 112 .byte 6 113 .byte 64 114 .byte 24 115 .byte 3 116 .byte 14 117 .byte 58 118 .byte 11 119 .byte 59 120 .byte 11 121 .byte 39 122 .byte 25 123 .byte 73 124 .byte 19 125 .byte 63 126 .byte 25 127 .byte 0 128 .byte 0 129 .byte 3 130 .byte 5 131 .byte 0 132 .byte 2 133 .byte 23 134 .byte 3 135 .byte 14 136 .byte 58 137 .byte 11 138 .byte 59 139 .byte 11 140 .byte 73 141 .byte 19 142 .byte 0 143 .byte 0 144 .byte 4 145 .byte 36 146 .byte 0 147 .byte 3 148 .byte 14 149 .byte 62 150 .byte 11 151 .byte 11 152 .byte 11 153 .byte 0 154 .byte 0 155 .byte 5 156 .byte 15 157 .byte 0 158 .byte 73 159 .byte 19 160 .byte 0 161 .byte 0 162 .byte 0 163 .section .debug_info,"",%progbits 164.Lcu_begin0: 165 .long 84 166 .short 4 167 .long .debug_abbrev 168 .byte 4 169 .byte 1 170 .long .Linfo_string0 171 .short 12 172 .long .Linfo_string1 173 .long .Lline_table_start0 174 .long .Linfo_string2 175 176 .long .Lfunc_begin0 177 .long .Lfunc_end0-.Lfunc_begin0 178 .byte 2 179 .long .Lfunc_begin0 180 .long .Lfunc_end0-.Lfunc_begin0 181 .byte 1 182 .byte 91 183 .long .Linfo_string3 184 .byte 1 185 .byte 1 186 187 .long 75 188 189 .byte 3 190 .long .Ldebug_loc0 191 .long .Linfo_string5 192 .byte 1 193 .byte 1 194 .long 82 195 .byte 0 196 .byte 4 197 .long .Linfo_string4 198 .byte 5 199 .byte 4 200 .byte 5 201 .long 75 202 .byte 0 203 .section .debug_ranges,"",%progbits 204 .section .debug_macinfo,"",%progbits 205.Lcu_macro_begin0: 206 .byte 0 207 .section .debug_pubnames,"",%progbits 208 .long .LpubNames_end0-.LpubNames_begin0 209.LpubNames_begin0: 210 .short 2 211 .long .Lcu_begin0 212 .long 88 213 .long 38 214 .asciz "foo" 215 .long 0 216.LpubNames_end0: 217 .section .debug_pubtypes,"",%progbits 218 .long .LpubTypes_end0-.LpubTypes_begin0 219.LpubTypes_begin0: 220 .short 2 221 .long .Lcu_begin0 222 .long 88 223 .long 75 224 .asciz "int" 225 .long 0 226.LpubTypes_end0: 227 228 .ident "clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)" 229 .section ".note.GNU-stack","",%progbits 230 .eabi_attribute 30, 1 231 .section .debug_line,"",%progbits 232.Lline_table_start0: 233