From: Eli Zaretskii <eliz@gnu.org>
To: Julian Brown <julian@codesourcery.com>
Cc: gdb-patches@sourceware.org, tromey@redhat.com
Subject: Re: [PATCH/WIP] C/C++ wchar_t/Unicode printing support
Date: Fri, 16 Jan 2009 09:36:00 -0000 [thread overview]
Message-ID: <u3afjwq2c.fsf@gnu.org> (raw)
In-Reply-To: <20090115202411.5f154657@rex.config>
> Date: Thu, 15 Jan 2009 20:24:11 +0000
> From: Julian Brown <julian@codesourcery.com>
> Cc: tromey@redhat.com
>
> This patch contains (at least the start of) support for printing
> wchar_t strings from a debugged program within GDB. This is the subject
> for GDB bugs 9103 (and its duplicates 9369, 9268) and maybe 7821.
Thank you!
> OK to apply
Not without documentation, sorry. Such an important feature should
not go in undocumented.
> or any comments?
A few:
> (gdb) show host-charset
> The host character set is "UTF-8" (auto).
Elsewhere in GDB, we show such settings in a slightly different form:
(gdb) show language
The current source language is "auto; currently c".
I like this latter form better: it first says that the setting is
"auto", then what is the detected state.
> + #ifndef GDB_DEFAULT_TARGET_WIDE_CHARSET
> + #define GDB_DEFAULT_TARGET_WIDE_CHARSET "UTF-32"
> + #endif
> +
> + #ifndef GDB_INTERNAL_CODESET
> + #define GDB_INTERNAL_CODESET "UCS-4LE"
> + #endif
Why are these the defaults? because of what GNU/Linux (i.e. glibc)
does, or for some other reason? If the former, shouldn't this be
autoconfigured?
> + static const char *target_wide_charset_enum[] =
> + {
> + "UCS-2",
> + "UCS-2LE",
> + "UCS-2BE",
> + "UCS-4",
> + "UCS-4LE",
> + "UCS-4BE",
> + "UTF-16",
> + "UTF-16LE",
> + "UTF-16BE",
> + "UTF-32",
> + "UTF-32LE",
> + "UTF-32BE",
> + 0
> + };
Why do we need the UCS-2 charsets? That's just confusing; are there
important platforms that support UCS-2 instead of UTF-16? I'd also
suggest to consider removing UTF-32 and its endian variants, since
they are exactly identical to UCS-4. (Unless someone wants to support
the Emacs 23 internal representation, but that one should be called by
its own name anyway.)
next prev parent reply other threads:[~2009-01-16 9:36 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 [this message]
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
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=u3afjwq2c.fsf@gnu.org \
--to=eliz@gnu.org \
--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