This is the mail archive of the
mailing list for the GDB project.
Re: [patch, testsuite] check for UTF-32 target wide charset support in gdb.base/wchar.exp
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: <gdb-patches at sourceware dot org>
- Date: Wed, 16 Sep 2015 23:16:37 -0600
- Subject: Re: [patch, testsuite] check for UTF-32 target wide charset support in gdb.base/wchar.exp
- Authentication-results: sourceware.org; auth=none
- References: <55FA325D dot 1020207 at codesourcery dot com> <8361397hwd dot fsf at gnu dot org>
On 09/16/2015 11:07 PM, Eli Zaretskii wrote:
Date: Wed, 16 Sep 2015 21:24:13 -0600
From: Sandra Loosemore <firstname.lastname@example.org>
If GDB is configured without ICONV support, the target wide charset
defaults to "ISO-8859-1" (which isn't even a wide charset), and all the
wide strings in this test print as gibberish. Otherwise, GDB seems to
think the default is "auto; currently UTF-32", so let's make the
dependency on UTF-32 explicit here and bail out if it's not available.
Why UTF-32, hard-coded? Why not allow also UTF-16, for example?
It looked to me like the default target wide charset is UTF-32 if you
don't pick one explicitly. Since the test as currently written doesn't,
the patterns the .exp file is trying to match must assume the default
target wide charset, and not some other wide charset that might happen
to be supported.
If I'm confused and the default charset might not always be UTF-32 if
ICONV is present, how about changing the testcase to bail if it sees the
default wide charset is ISO-8859-1? That means either ICONV is not
present or GDB's default is otherwise wrongly configured.