From: Tom Tromey <tromey@redhat.com>
To: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
Cc: "'Eli Zaretskii'" <eliz@gnu.org>, <gdb-patches@sourceware.org>
Subject: Re: [RFC] Allow explicit 16 or 32 char in 'x /s'
Date: Tue, 30 Mar 2010 20:33:00 -0000 [thread overview]
Message-ID: <m3r5n1v9c0.fsf@fleche.redhat.com> (raw)
In-Reply-To: <15103.6087111153$1269298497@news.gmane.org> (Pierre Muller's message of "Mon, 22 Mar 2010 23:54:34 +0100")
>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:
Pierre> But I don't know exactly for other languages and I would like
Pierre> to be sure about what you want me to add to the docs...
I think no other language has been updated to deal with wide characters.
Pierre> Furthermore if you look into charset_for_string_type
Pierre> function in c-lang.c source, you will see that there are two FIXME
Pierre> just right at the position of these charset name settings.
Yeah ... those are actually pedantic FIXMEs, in that (IIRC) nothing
guarantees that char16_t==UTF-16, even though that is the common
meaning.
Pierre> To answer Tom's concern about the change in classify_type function,
Pierre> I modified my patch to change the elttype in do_examine to match exactly
Pierre> what is expected by charset_for_string_type function.
Pierre> Thus this new version has no modification in c-lang.c file.
Suppose the inferior does not define char16_t. Won't this new code
allocate a new type each time the user uses x/hs? That seems bad.
What about passing the desired encoding to LA_PRINT_STRING, via a new
argument to val_print_string? That makes the patch a lot bigger, though
it is mostly mechanical.
Pierre> I also added a very basic check for string display using 'x
Pierre> /hs' and 'x /ws'.
Thanks.
Pierre> + case 's':
Pierre> + /* Display strings with byte size chars unless explicitly specified.
Pierre> */
Pierre> + val.size = 'b';
Pierre> + break;
I think x/hs followed by x should probably print another wide string.
I couldn't tell offhand if it does this or not.
Tom
next prev parent reply other threads:[~2010-03-30 20:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <11484.4708740295$1268865815@news.gmane.org>
2010-03-18 22:08 ` Tom Tromey
2010-03-19 7:32 ` Eli Zaretskii
2010-03-22 22:54 ` Pierre Muller
[not found] ` <15103.6087111153$1269298497@news.gmane.org>
2010-03-30 20:33 ` Tom Tromey [this message]
2010-03-31 16:11 ` [RFC-v2] " Pierre Muller
[not found] ` <006101cad0ec$cb7915d0$626b4170$%muller@ics-cnrs.unistra.fr>
2010-03-31 16:17 ` Eli Zaretskii
2010-04-01 9:34 ` Pierre Muller
[not found] ` <000f01cad17e$7686f140$6394d3c0$%muller@ics-cnrs.unistra.fr>
2010-04-01 13:17 ` Eli Zaretskii
2010-04-05 23:01 ` Pierre Muller
[not found] ` <002701cad513$e44a7420$acdf5c60$%muller@ics-cnrs.unistra.fr>
2010-04-06 17:51 ` Eli Zaretskii
2010-04-08 20:58 ` [RFA-v3] " Pierre Muller
2010-04-16 8:41 ` [PING] " Pierre Muller
[not found] ` <48335.255837492$1271407316@news.gmane.org>
2010-04-21 22:49 ` Tom Tromey
2010-04-21 23:22 ` Pierre Muller
2010-06-11 17:38 ` Ulrich Weigand
2010-07-02 19:09 ` Tom Tromey
2010-07-05 10:17 ` Ulrich Weigand
2010-07-20 20:13 ` [patch] testsuite: regression on failed charset.exp compilation [Re: [RFA-v3] Allow explicit 16 or 32 char in 'x /s'] Jan Kratochvil
2010-07-20 22:00 ` Tom Tromey
2010-07-20 22:13 ` Jan Kratochvil
2010-03-17 22:43 [RFC] Allow explicit 16 or 32 char in 'x /s' Pierre Muller
2010-03-18 7:01 ` Eli Zaretskii
2010-03-18 14:20 ` Pierre Muller
[not found] ` <001e01cac69a$75167630$5f436290$%muller@ics-cnrs.unistra.fr>
2010-03-18 18:26 ` Eli Zaretskii
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=m3r5n1v9c0.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/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).