Date: Mon, 29 May 2017 16:39:29 -0300 From: "Dr. Rolf Jansen" <rj@obsigna.com> To: Ed Maste <emaste@freebsd.org> Cc: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: lldb on BeagleBone Black Message-ID: <0FB71E50-DF25-461A-9925-1CF295ABB599@obsigna.com> In-Reply-To: <CAPyFy2DckNBrOS8Qvosdu2H=TTmxZLko4ybeR-ux5sV5c8BuCg@mail.gmail.com> References: <3DA2368D-AE7B-4D69-A634-2861D2EFA9AE@obsigna.com> <8FDE5FCC-9BA8-4601-A32E-04FBAB5FFBEA@obsigna.com> <1C1DA369-0BF1-4E22-A998-1E36CDC1A203@obsigna.com> <CAPyFy2DckNBrOS8Qvosdu2H=TTmxZLko4ybeR-ux5sV5c8BuCg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> Am 29.05.2017 um 12:08 schrieb Ed Maste <emaste@freebsd.org>: >=20 > On 28 May 2017 at 10:34, Dr. Rolf Jansen <rj@obsigna.com> wrote: >> This is only a follow-up notice. >>=20 >> I reliably managed to build (lldb + clang/lld) from the svn trunk of = LLVM 5.0.0 on my Beaglebone Black running the latest snapshot (May 20th) = of FreeBSD 12.0-CURRENT, and the lldb is working very well, and this = includes single stepping and ncurses-GUI mode, while single stepping = with the latest lldb 4.0.1 from the ports does not work. >=20 > Thanks for the follow-up, and for your persistence in trying to build > LLDB on the BBB! >=20 > In what way is the UTF-8 output broken? First of all, my system's locale is: LANG=3Den_US.UTF-8 LC_CTYPE=3D"en_US.UTF-8" LC_COLLATE=3D"en_US.UTF-8" LC_TIME=3D"en_US.UTF-8" LC_NUMERIC=3D"en_US.UTF-8" LC_MONETARY=3D"en_US.UTF-8" LC_MESSAGES=3D"en_US.UTF-8" LC_ALL=3D $echo $TERM xterm-256color Now, please consider the following tiny ncurses test program = 'cursutf8.c', which prints out the traditional German pangram for = testing the special characters '=C3=A4', '=C3=B6', '=C3=BC', '=C3=9F', = each of which consists of two bytes when encoded in UTF8: #include <stdio.h> #include <locale.h> #include <curses.h> #include <unistd.h> int main(int argc, char *argv[]) { setlocale(LC_CTYPE, ""); WINDOW *window =3D initscr(); if (window) { mvaddstr(3, 3, "Zw=C3=B6lf Boxk=C3=A4mpfer jagen Viktor quer =C3=BCb= er den gro=C3=9Fen Sylter Deich."); refresh(); sleep(3); delwin(window); endwin(); refresh(); return 0; } else return 1; } I compile this using: $clang -g -O0 cursutf8.c -lncursesw -o cursutf8 When I run it, it correctly prints out: Zw=C3=B6lf Boxk=C3=A4mpfer jagen Viktor quer =C3=BCber den gro=C3=9Fen = Sylter Deich. Then I start this with lldb: $lldb -- cursutf8 (lldb) breakpoint set -f cursutf8.c -l 13 (lldb) run Process 13886 stopped * thread #1, name =3D 'cursutf8', stop reason =3D breakpoint 1.1 frame #0: 0x00008a08 cursutf8`main(argc=3D1, argv=3D0xbfbfec74) at = cursutf8.c:13 10 WINDOW *window =3D initscr(); 11 if (window) 12 { -> 13 mvaddstr(3, 3, "Zw=C3=B6lf Boxk=C3=A4mpfer jagen Viktor = quer =C3=BCber den gro=C3=9Fen Sylter Deich."); 14 refresh(); 15 sleep(3); 16 =09 So far this is OK as well. The issue shows up, when I enter into the GUI mode: (lldb) gui =E2=94=82 10 =E2=94=82 WINDOW *window =3D initscr(); = =20 =E2=94=82 11 =E2=94=82 if (window) = =20 =E2=94=82 12 =E2=94=82 { = =20 =E2=94=82 13 =E2=94=82=E2=97=86 mvaddstr(3, 3, "ZwM-CM-6lf = BoxkM-CM-$mpfer jagen Viktor quer M-CM-<ber den groM-C~_en Sylter = Deich.");=20 =E2=94=82 14 =E2=94=82 refresh(); = =20 =E2=94=82 15 =E2=94=82 sleep(3); = =20 =E2=94=82 16 =E2=94=82 CONCLUSION: Within LLDB on x86, utf8 text is displayed well in CLI and in GUI mode. Within LLDB on ARMv6, utf8 test is displayed correctly in CLI but NOT in = curse-GUI mode. A simple ncurses program as such, can handle utf8 text correctly on ARM = and x86. Best regards Rolf
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0FB71E50-DF25-461A-9925-1CF295ABB599>