From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103011 invoked by alias); 17 Sep 2015 05:10:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 103001 invoked by uid 89); 17 Sep 2015 05:10:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout24.012.net.il Received: from mtaout24.012.net.il (HELO mtaout24.012.net.il) (80.179.55.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Sep 2015 05:10:38 +0000 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NUT000001XGIJ00@mtaout24.012.net.il> for gdb-patches@sourceware.org; Thu, 17 Sep 2015 08:03:09 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUT00OSR2194V10@mtaout24.012.net.il>; Thu, 17 Sep 2015 08:03:09 +0300 (IDT) Date: Thu, 17 Sep 2015 05:10:00 -0000 From: Eli Zaretskii Subject: Re: [patch, testsuite] check for UTF-32 target wide charset support in gdb.base/wchar.exp In-reply-to: To: Doug Evans Cc: sandra@codesourcery.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <834mit7hrm.fsf@gnu.org> References: <55FA325D.1020207@codesourcery.com> X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00395.txt.bz2 > From: Doug Evans > Cc: gdb-patches > Date: Wed, 16 Sep 2015 21:30:46 -0700 > > #undef GDB_DEFAULT_HOST_CHARSET > #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" > #define GDB_DEFAULT_TARGET_CHARSET "ISO-8859-1" > #define GDB_DEFAULT_TARGET_WIDE_CHARSET "ISO-8859-1" <<<< > > How reasonable is it to enhance the PHONY_ICONV support so that > it handles this better? You mean, have functions like strlen and strcat handle 32-bit wchar_t strings? Not reasonable. > I see it already tries to provide some minimal functionality: > > static iconv_t > phony_iconv_open (const char *to, const char *from) > { > /* We allow conversions from UTF-32BE, wchar_t, and the host charset. > We allow conversions to wchar_t and the host charset. */ > if (strcmp (from, "UTF-32BE") && strcmp (from, "wchar_t") > && strcmp (from, GDB_DEFAULT_HOST_CHARSET)) > return -1; > if (strcmp (to, "wchar_t") && strcmp (to, GDB_DEFAULT_HOST_CHARSET)) > return -1; > > /* Return 1 if we are converting from UTF-32BE, 0 otherwise. This is > used as a flag in calls to iconv. */ > return !strcmp (from, "UTF-32BE"); > } > > I don't know, off hand, why big endian is supported and not little endian. Supported by whom?