From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6659 invoked by alias); 31 Aug 2010 09:25:39 -0000 Received: (qmail 6438 invoked by uid 22791); 31 Aug 2010 09:25:38 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_20,MSGID_MULTIPLE_AT,TW_BJ,TW_SN X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 09:25:31 +0000 Received: from md1.u-strasbg.fr (md1.u-strasbg.fr [IPv6:2001:660:2402::186]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o7V9P9RA079649 ; Tue, 31 Aug 2010 11:25:10 +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 md1.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o7V9P93d041156 ; Tue, 31 Aug 2010 11:25:09 +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 o7V9P8RY012518 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Tue, 31 Aug 2010 11:25:09 +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> In-Reply-To: Subject: RE: Your INTERMEDIATE_ENCODING patch for Solaris Date: Tue, 31 Aug 2010 09:25:00 -0000 Message-ID: <001b01cb48ee$6b8425f0$428c71d0$@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-08/txt/msg00543.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: Monday, August 30, 2010 8:01 PM > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: Your INTERMEDIATE_ENCODING patch for Solaris >=20 > >>>>> "Tom" =3D=3D Tom Tromey writes: >=20 > Tom> Here's a new version that should disable iconv on this platform, > among > Tom> others. >=20 > Hi Pierre. Did this patch work for you? Hi Tom, sorry for the delay: here are a few results: Test machine #1:=20 uname -a output: SunOS opensolaris 5.11 snv_111b i86pc i386 i86pc Solaris With your patch, gdb compiles fine,=20 gdbcvs/build-norm/gdb$ grep ICONV *.h config.h:#define HAVE_ICONV 1 config.h:/* #undef HAVE_ICONVLIST */ config.h:/* #undef HAVE_LIBICONVLIST */ config.h:#define ICONV_CONST const ./gdb ./gdb (top-gdb) p version $1 =3D "7.2.50.20100831-cvs" after replacing \r\n by \r+\n in charset.exp, I get: .../gdb/testsuite$ gmake check RUNTESTFLAGS=3Dcharset.exp =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 111 # of unexpected failures 50 (Do you want the detailed output?) (Without patch, but the same modified charset.exp, the printing of version fails I get: =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 74 # of unexpected failures 87 ) Test machine #2:=20 uname -a output: uname -a SunOS muller 5.11 snv_111b sun4v sparc SUNW,Sun-Fire-T200 Solaris gdb/buildcvs/gdb$ ./gdb ./gdb (top-gdb) p version $1 =3D "7.2.50.20100831-cvs" (top-gdb) inf func iconv All functions matching regular expression "iconv": File ../../src/gdb/charset.c: size_t phony_iconv(int, const char **, size_t *, char **, size_t *); int phony_iconv_close(int); int phony_iconv_open(const char *, const char *); static void cleanup_iconv(void *); (top-gdb) q :/gdb/buildcvs/gdb$ grep ICONV *.h config.h:/* #undef HAVE_ICONV */ config.h:/* #undef HAVE_ICONVLIST */ config.h:/* #undef HAVE_LIBICONVLIST */ config.h:/* #undef ICONV_CONST */ So apparently on Sparc, the C library iconv is not found, despite the fact that it is in libc.so: /lib$ objdump -T libc.so |grep iconv 0005f768 g DF .text 00000034 SUNW_0.8 .protected iconv 0005f6e8 g DF .text 00000080 SUNW_0.8 .protected iconv_close 0005f000 g DF .text 000000b4 SUNW_0.8 .protected iconv_open After searching, it appears that the problem comes from the fact that /usr/local/include is searched before /usr/include, while /usr/local/lib is not searched at all for libraries. /usr/local/include/iconv.h contains the /usr/local/lib/libiconv.so header. Compilation without -liconv fails because /usr/local/include/iconv.h has: #define iconv libiconv but libiconv is not found in c library. and the second compilation with "-liconv" option fails because /usr/local/lib is not in the library search path. Ugly, no? For that machine, the output did not change as none of the ICONV macros are set. Test machine #3 x86_64 prcoessor: uname -a SunOS muller 5.11 snv_111b i86pc i386 i86pc Solaris gdb/build-64/gdb$ grep ICONV *.h config.h:#define HAVE_ICONV 1 config.h:/* #undef HAVE_ICONVLIST */ config.h:/* #undef HAVE_LIBICONVLIST */ config.h:#define ICONV_CONST const So this one uses c library iconv. (top-gdb) p version $1 =3D (top-gdb) inf fun iconv All functions matching regular expression "iconv": File ../../src/gdb/charset.c: static void cleanup_iconv(void *); Non-debugging symbols: 0x0000000000514860 iconv_open 0x0000000000514860 iconv_open@plt 0x0000000000514870 iconv_close 0x0000000000514870 iconv_close@plt 0x0000000000514880 iconv 0x0000000000514880 iconv@plt (top-gdb) set host-charset UTF-8 (top-gdb) p version $2 =3D "7.2.50.20100831-cvs" So here, the c library iconv functions are used, but the default host-charset is set to ASCII which is=20 not handled by that iconv :( So I would like to have the default host and target=20 charset changed to UTF-8. It is of course possible to use: gdb/build-64/gdb$ export LANG=3Den_US.UTF-8 in that case, the defaults are set correctly: (top-gdb) p version $1 =3D "7.2.50.20100831-cvs" (top-gdb) show charset The host character set is "auto; currently UTF-8". The target character set is "auto; currently UTF-8". The target wide character set is "auto; currently UTF-32". But I would still prefer if we changed also the default to UTF-8 for solaris. Pierre