From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44207 invoked by alias); 18 Sep 2015 04:38:00 -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 44194 invoked by uid 89); 18 Sep 2015 04:37:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 18 Sep 2015 04:37:58 +0000 Received: by padhk3 with SMTP id hk3so39083681pad.3 for ; Thu, 17 Sep 2015 21:37:56 -0700 (PDT) X-Received: by 10.66.253.170 with SMTP id ab10mr4774098pad.135.1442551076379; Thu, 17 Sep 2015 21:37:56 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by smtp.gmail.com with ESMTPSA id l16sm6234577pbq.22.2015.09.17.21.37.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Sep 2015 21:37:56 -0700 (PDT) From: Doug Evans To: Eli Zaretskii Cc: sandra@codesourcery.com, gdb-patches@sourceware.org Subject: Re: [patch, testsuite] check for UTF-32 target wide charset support in gdb.base/wchar.exp References: <55FA325D.1020207@codesourcery.com> <834mit7hrm.fsf@gnu.org> Date: Fri, 18 Sep 2015 04:38:00 -0000 In-Reply-To: <834mit7hrm.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 Sep 2015 08:10:37 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00436.txt.bz2 Eli Zaretskii writes: >> 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. Yikes. No, I didn't mean that. :-) I meant have the PHONY_ICONV case use a better value for GDB_DEFAULT_TARGET_WIDE_CHARSET. >> 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? By PHONY_ICONV. [which is more of a minimal iconv than a phony iconv, but whatever]