From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12049 invoked by alias); 5 Aug 2010 18:40:54 -0000 Received: (qmail 12040 invoked by uid 22791); 5 Aug 2010 18:40:53 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Aug 2010 18:40:49 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o75Ief8u010826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Aug 2010 14:40:41 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o75IebAA022562; Thu, 5 Aug 2010 14:40:38 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o75IeaKL003915; Thu, 5 Aug 2010 14:40:36 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 08A493782ED; Thu, 5 Aug 2010 12:40:35 -0600 (MDT) From: Tom Tromey To: kazu@codesourcery.com (Kazu Hirata) Cc: gdb-patches@sourceware.org Subject: Re: Your INTERMEDIATE_ENCODING patch for Solaris References: <20100731162500.32FAE5664F4@henry1.codesourcery.com> Date: Thu, 05 Aug 2010 18:40:00 -0000 In-Reply-To: <20100731162500.32FAE5664F4@henry1.codesourcery.com> (Kazu Hirata's message of "Sat, 31 Jul 2010 09:25:00 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2010-08/txt/msg00044.txt.bz2 >>>>> "Kazu" == Kazu Hirata writes: Kazu> We've been using a version of your patch posted at: Kazu> http://sourceware.org/ml/gdb-patches/2009-07/msg00434.html Kazu> except that we use Kazu> #ifdef __sun__ Kazu> rather than Kazu> #ifdef __STDC_ISO_10646__ Kazu> to special case for Solaris. Kazu> As Andrew replied to your message above, __STDC_ISO_10646__ is not Kazu> defined on Solaris. Could we use __sun__ instead? I am not a Solaris expert, but some digging through the online OpenSolaris libc sources a few months ago convinced me that the Solaris wchar_t is in fact not UCS-4. If that is true, then this patch would be incorrect. My recollection is that if your locale's encoding was a stateful one, then the Solaris wchar_t held the state in the high bits and the character in the low bits; so I suppose this would be one way to try to test to verify this hypothesis. A better way would be to check out the libc and read through it oneself. This particular problem has come up multiple times. I am not completely sure what to do about it, but my current inclination is to change gdb so that most hosts fall back to PHONY_ICONV, with exceptions for libiconv and for Linux. This will at least have gdb default to working, and is also attractive because I have some hope of actually testing it. Tom