From: Daniel Jacobowitz <drow@false.org>
To: Tom Tromey <tromey@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
Julian Brown <julian@codesourcery.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH/WIP] C/C++ wchar_t/Unicode printing support
Date: Sun, 01 Feb 2009 23:16:00 -0000 [thread overview]
Message-ID: <20090201231604.GA24974@caradoc.them.org> (raw)
In-Reply-To: <m3skmxrdb6.fsf@fleche.redhat.com>
On Sun, Feb 01, 2009 at 03:40:29PM -0700, Tom Tromey wrote:
> Daniel> It seems like a dummy version of iconv_open which only succeeds if the
> Daniel> two character sets are the same, plus a pass-through version of iconv,
> Daniel> would be enough to remove the iconv dependency. That degraded mode
> Daniel> covers all local debugging.
>
> The wchar_t issue comes into play because we actually do two
> conversions when printing: one from the target charset to the host
> wchar_t, and then a second one from the host wchar_t to the host
> "narrow" charset.
>
> This just adds a wrinkle to the implementation, though -- the general
> plan still applies. We could either pretend that wchar_t == char, or
> we could make an iconv that uses the mb* functions.
I see. Yes, this will be a bit trickier, but not much.
As far as portability goes, we may have to experiment. But I can tell
you flat out that swprintf is going to be a problem; it's a C99
library function and most hosts don't have C99 library extensions.
I see that gnulib has at least part of a vasnwprintf implementation...
I wonder if they're planning to finish it.
> I can implement this, but I'd rather do it only if it is truly needed.
>
> How are you planning to handle this for Code Sourcery? Really I would
> like to hear the answer to this from anybody shipping a gdb
> executable.
We're really not the ones you have to convince. This is a
difficulty-building-GDB issue; commercial distributors only have to
get it to build once. And we tend to be limited to mainstream
platforms; e.g. 95% of the toolchains CodeSourcery builds are
hosted on either Windows (mingw32) or GNU/Linux (RH8, RHEL3).
We've used a static GNU libiconv for our Windows tools for ages.
People on HP/UX or AIX may have a more interesting time of it.
> Daniel> There'd need to be a little additional
> Daniel> logic too, to allow you to set all the charset variables at
> Daniel> once
>
> I think "set charset" already does this. It doesn't handle the target
> wide charset, but that seems ok in the degraded functionality mode.
Right. Except that if the wide charset remains unchanged, validate
will report an error since it can't convert to it...
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2009-02-01 23:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 20:24 Julian Brown
2009-01-15 21:02 ` Tom Tromey
2009-01-15 21:18 ` Joseph S. Myers
2009-01-16 0:01 ` Tom Tromey
2009-01-15 22:16 ` Julian Brown
2009-01-16 0:53 ` Tom Tromey
2009-01-16 9:36 ` Eli Zaretskii
2009-01-16 16:18 ` Tom Tromey
2009-01-16 16:40 ` Eli Zaretskii
2009-01-16 16:57 ` Mark Kettenis
2009-01-30 4:11 ` Tom Tromey
2009-01-30 22:14 ` Joel Brobecker
[not found] ` <m3ocxos6og.fsf@fleche.redhat.com>
2009-02-01 18:23 ` Daniel Jacobowitz
2009-02-01 22:42 ` Tom Tromey
2009-02-01 23:16 ` Daniel Jacobowitz [this message]
2009-02-01 23:18 ` Daniel Jacobowitz
2009-02-01 23:26 ` Tom Tromey
2009-02-03 0:41 ` Joel Brobecker
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=20090201231604.GA24974@caradoc.them.org \
--to=drow@false.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=julian@codesourcery.com \
--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