From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Tom Tromey'" <tromey@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: Your INTERMEDIATE_ENCODING patch for Solaris
Date: Wed, 01 Sep 2010 07:30:00 -0000 [thread overview]
Message-ID: <001801cb49a7$83813440$8a839cc0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <m3k4n6hgqe.fsf@fleche.redhat.com>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé : Tuesday, August 31, 2010 6:47 PM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: Your INTERMEDIATE_ENCODING patch for Solaris
>
> >>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
> writes:
>
> 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.
>
> Yuck.
>
> This setup seems unfortunate but I don't think there is much gdb should
> do about it.
I agree with you here :(
> Pierre> Test machine #3 x86_64 prcoessor:
> [...]
> Pierre> So this one uses c library iconv.
> Pierre> (top-gdb) p version
> Pierre> $1 = <error reading variable>
> Pierre> (top-gdb) inf fun iconv
> Pierre> All functions matching regular expression "iconv":
>
> 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 :(
>
> 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?
> Pierre> So I would like to have the default host and target
> Pierre> charset changed to UTF-8.
>
> 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
===================================================================
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 = "UTF-8";
+ else if (!*auto_host_charset_name)
auto_host_charset_name = "ASCII";
auto_target_charset_name = 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
next prev parent reply other threads:[~2010-09-01 7:30 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-31 16:25 Kazu Hirata
2010-08-05 18:40 ` Tom Tromey
2010-08-10 20:28 ` Daniel Jacobowitz
2010-08-17 18:06 ` Tom Tromey
2010-08-17 18:44 ` Joel Brobecker
2010-08-17 19:03 ` Tom Tromey
2010-08-18 10:14 ` Joel Brobecker
2010-08-18 14:43 ` Pierre Muller
2010-08-18 14:52 ` Joel Brobecker
2010-08-18 15:10 ` Pierre Muller
2010-08-18 15:35 ` Tom Tromey
2010-08-18 15:44 ` Tom Tromey
2010-08-18 16:36 ` Joel Brobecker
2010-08-18 17:35 ` Tom Tromey
2010-08-18 17:41 ` Joel Brobecker
[not found] ` <15264.6257346079$1282142643@news.gmane.org>
2010-08-18 16:12 ` Tom Tromey
2010-08-19 15:03 ` Pierre Muller
2010-08-19 16:09 ` Tom Tromey
2010-08-30 18:01 ` Tom Tromey
2010-08-31 9:25 ` Pierre Muller
2010-08-31 16:47 ` Tom Tromey
2010-09-01 7:30 ` Pierre Muller [this message]
[not found] ` <44796.6229789474$1283326243@news.gmane.org>
2010-09-01 22:35 ` Tom Tromey
2010-09-02 14:21 ` Pierre Muller
2010-09-02 15:39 ` Tom Tromey
2010-09-14 21:29 ` Tom Tromey
2010-09-15 17:20 ` Pierre Muller
2010-09-16 7:55 ` Tom Tromey
2010-09-16 9:49 ` Pierre Muller
2010-09-16 20:22 ` Tom Tromey
2010-09-16 22:31 ` Pierre Muller
[not found] ` <20078.2261243605$1284672670@news.gmane.org>
2010-09-17 9:21 ` Tom Tromey
2010-09-17 13:48 ` Pierre Muller
2010-09-23 13:00 ` Tom Tromey
2010-09-23 14:48 ` Pierre Muller
2010-09-27 18:42 ` Tom Tromey
2010-09-16 17:51 ` [patch] Regression on py-prettyprint.exp: print estring [Re: Your INTERMEDIATE_ENCODING patch for Solaris] Jan Kratochvil
2010-09-16 20:33 ` Tom Tromey
2010-09-16 20:44 ` Jan Kratochvil
2010-08-18 11:52 ` Your INTERMEDIATE_ENCODING patch for Solaris Pierre Muller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001801cb49a7$83813440$8a839cc0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).