From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: printing 0xbeef wchar_t on x86-windows...
Date: Tue, 16 Oct 2012 23:31:00 -0000 [thread overview]
Message-ID: <20121016233130.GJ3050@adacore.com> (raw)
In-Reply-To: <87wqyq6tcl.fsf@fleche.redhat.com>
> Joel> * valprint.c:generic_emit_char calls wchar_iterate, and finds
> Joel> one valid character according to the intermediate encoding
> Joel> ("wchar_t"), even though the character isn't valid in the
> Joel> original/target charset ("CP1252").
> generic_emit_char should be assuming that the character is in the target
> wide charset, not in the target charset. That is, "show
> target-wide-charset".
>
> If the 'encoding' argument to generic_emit_char is "CP1252" then I think
> something went wrong earlier.
OK, small correction: generic_emit_char was called with 'encoding'
set to "UTF-16LE", which makes sense, given that it is what the
windows (actually cygwin) -tdep file explicitly sets it to.
I probably got confused in my notes with what was happening with
GDB 7.5, or maybe just got confused period.
Other than that, I think that the rest remains accurate, so it seem
that...
> And, this call to convert_between_encodings is converting from the
> intermediate charset to the host charset. So, I think this should be
> sizeof (gdb_wchar_t).
... would be the way to go, assuming that we're not waiting for Keith's
patches. A small request: If Keith's patch is still some ways off, I'd
love to have a fix put in while we wait. This bug, and a few other
charset-related ones, have been nagging at me for a while, and with
more important tasks, traveling and, hum, holidays, I haven't had
the time to follow up as quickly as I'd like...
Cheers!
--
Joel
next prev parent reply other threads:[~2012-10-16 23:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 19:01 Joel Brobecker
2012-10-15 19:46 ` Eli Zaretskii
2012-10-15 20:14 ` Joel Brobecker
2012-10-16 20:43 ` Tom Tromey
2012-10-16 22:43 ` Joel Brobecker
2012-10-17 1:37 ` Tom Tromey
2012-10-17 14:58 ` Joel Brobecker
2012-10-17 18:28 ` Tom Tromey
2012-10-17 18:43 ` Joel Brobecker
2012-10-17 19:20 ` Tom Tromey
2012-10-16 23:31 ` Joel Brobecker [this message]
2012-10-17 1:38 ` Tom Tromey
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=20121016233130.GJ3050@adacore.com \
--to=brobecker@adacore.com \
--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