Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Paul Koning <Paul_Koning@dell.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Make string printing work on NetBSD (iconv issue)
Date: Fri, 07 May 2010 16:40:00 -0000	[thread overview]
Message-ID: <m3ljbvhdhu.fsf@fleche.redhat.com> (raw)
In-Reply-To: <19424.30941.651367.946330@pkoning-laptop.equallogic.com> (Paul	Koning's message of "Tue, 4 May 2010 15:43:25 -0400")

>>>>> "Paul" == Paul Koning <Paul_Koning@dell.com> writes:

Paul> The attached patch fixes this by having configure pick a suitable
Paul> codeset name to use.  "wchar_t" is used if available, otherwise ucs-2
Paul> or ucs-4 with the appropriate byte order suffix is used instead.

This will yield incorrect results unless the chosen intermediate charset
is actually the one used for wchar_t.

Note that if this is the case for UCS-4, then your platform headers
ought to define __STDC_ISO_10646__.  So, you could test that in
gdb_wchar.h rather than do any configury.

Alternatively, it is always safe to fall back to the code that uses
narrow intermediate characters and host_charset for the intermediate
encoding.

Perhaps this "wchar_t" thing is not the best way for us to go.  Maybe
better would be to test __STDC_ISO_10646__ and fall back to narrow chars
in all other cases.

Other approaches are available too, but they are generally more work
than simply using GNU libiconv.

Tom


  parent reply	other threads:[~2010-05-07 16:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-04 19:43 Paul Koning
2010-05-04 20:01 ` Andreas Schwab
2010-05-04 20:06   ` Paul Koning
2010-05-07 16:40 ` Tom Tromey [this message]
2010-05-07 17:26   ` Paul Koning
2010-05-07 22:46     ` Tom Tromey
2010-05-10 21:25       ` Paul Koning
2010-05-19 15:11     ` Tom Tromey
2010-05-19 15:25       ` Paul Koning
2010-05-19 15:30         ` Tom Tromey
2010-05-19 18:23           ` Paul Koning

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=m3ljbvhdhu.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=Paul_Koning@dell.com \
    --cc=gdb-patches@sourceware.org \
    /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