This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 5/6] Handle "set print sevenbit-strings on" in print_wchar
- From: Keith Seitz <keiths at redhat dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: "'gdb-patches'" <gdb-patches at sourceware dot org>
- Date: Tue, 22 Oct 2013 11:25:28 -0700
- Subject: Re: [RFC 5/6] Handle "set print sevenbit-strings on" in print_wchar
- Authentication-results: sourceware.org; auth=none
- References: <002901cebaf2$35ec65a0$a1c530e0$ at muller@ics-cnrs.unistra.fr> <003801cebaf3$888993e0$999cbba0$ at muller@ics-cnrs.unistra.fr> <524A231F dot 1050101 at redhat dot com> <000601cebea9$6c4bf1f0$44e3d5d0$ at muller@ics-cnrs.unistra.fr>
On 10/01/2013 06:23 AM, Pierre Muller wrote:
ChangeLog entry:
2013-10-01 Pierre Muller <muller@sourceware.org>
* valprint.c (print_wchar): Print all char above seven-bit
as octal or hexadecimal if SEVENBIT_STRINGS is non-zero.
testsuite ChangeLog:
2013-10-01 Pierre Muller <muller@sourceware.org>
gdb.base/charset.exp: Add test to print char \242 in charset CP1252
with or without "set print sevenbit-strings on".
Thank you for the test. This is exactly the kind of thing that is needed.
There is one little problem with this, though. As is, the first test,
"print \"\\242\"" will fail on linux (at least it does for me). This is
because gdb_init (in testsuite/lib/gdb.exp) overrides the environment's
locale settings. So we should probably force en_US.UTF-8 and restart gdb
before running your new tests:
setenv LANG en_US.UTF-8
setenv LC_ALL en_US.UTF-8
setenv LC_TYPE en_US.UTF-8
clean_restart $testfile
gdb_test "set charset CP1252" ...
With this, the test will pass.
Keith