From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29382 invoked by alias); 1 Sep 2010 07:30:37 -0000 Received: (qmail 29366 invoked by uid 22791); 1 Sep 2010 07:30:36 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Sep 2010 07:30:28 +0000 Received: from md2.u-strasbg.fr (md2.u-strasbg.fr [IPv6:2001:660:2402::187]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o817UCdV003842 ; Wed, 1 Sep 2010 09:30:13 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms8.u-strasbg.fr [IPv6:2001:660:2402:d::17]) by md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o817UB8p004869 ; Wed, 1 Sep 2010 09:30:12 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o817UB45092709 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Wed, 1 Sep 2010 09:30:11 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Tom Tromey'" Cc: References: <20100731162500.32FAE5664F4@henry1.codesourcery.com> <20100817184407.GC3599@adacore.com> <20100818101406.GA2903@adacore.com> <15264.6257346079$1282142643@news.gmane.org> <004b01cb3faf$b07ed580$117c8080$@muller@ics-cnrs.unistra.fr> <001b01cb48ee$6b8425f0$428c71d0$@muller@ics-cnrs.unistra.fr> In-Reply-To: Subject: RE: Your INTERMEDIATE_ENCODING patch for Solaris Date: Wed, 01 Sep 2010 07:30:00 -0000 Message-ID: <001801cb49a7$83813440$8a839cc0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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-09/txt/msg00006.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Tom Tromey > Envoy=E9=A0: Tuesday, August 31, 2010 6:47 PM > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: Your INTERMEDIATE_ENCODING patch for Solaris >=20 > >>>>> "Pierre" =3D=3D Pierre Muller > writes: >=20 > Pierre> After searching, it appears that the problem comes from the > fact > Pierre> that /usr/local/include is searched before /usr/include, > Pierre> while /usr/local/lib is not searched at all for libraries. >=20 > Yuck. >=20 > This setup seems unfortunate but I don't think there is much gdb should > do about it. I agree with you here :( =20 > Pierre> Test machine #3 x86_64 prcoessor: > [...] > Pierre> So this one uses c library iconv. > Pierre> (top-gdb) p version > Pierre> $1 =3D > Pierre> (top-gdb) inf fun iconv > Pierre> All functions matching regular expression "iconv": >=20 > Pierre> So here, the c library iconv functions are used, > Pierre> but the default host-charset is set to ASCII which is > Pierre> not handled by that iconv :( >=20 > I am not sure how this happens with the patch I posted. > Does this machine define __STDC_ISO_10646__? > Or did I somehow get the #if logic wrong? =20 > Pierre> So I would like to have the default host and target > Pierre> charset changed to UTF-8. >=20 > What does nl_langinfo(CODESET) return on this sytem? > If you remove the special "646" case, does it work? the ASCII charset is indeed set by the check to "646". If I replace this by (only the "646" specific change is listed): Index: charset.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/charset.c,v retrieving revision 1.34 diff -u -p -r1.34 charset.c --- charset.c 24 Jun 2010 18:24:03 -0000 1.34 +++ charset.c 1 Sep 2010 07:28:23 -0000 @@ -928,7 +931,9 @@ _initialize_charset (void) /* Solaris will return `646' here -- but the Solaris iconv then does not accept this. Darwin (and maybe FreeBSD) may return "" here, which GNU libiconv doesn't like (infinite loop). */ - if (!strcmp (auto_host_charset_name, "646") || !*auto_host_charset_name) + if (!strcmp (auto_host_charset_name, "646")) + auto_host_charset_name =3D "UTF-8"; + else if (!*auto_host_charset_name) auto_host_charset_name =3D "ASCII"; auto_target_charset_name =3D auto_host_charset_name; #elif defined (USE_WIN32API) I do get a default of '"UTF-8" for Open Solaris machines, but I don't know if other systems might also return "646", but not like the "UTF-8" choice. In any case, having a LANG environment variable set to xx_XX.UTF-8 also allows to get a nicely working gdb. Pierre