From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: printing 0xbeef wchar_t on x86-windows...
Date: Wed, 17 Oct 2012 18:28:00 -0000 [thread overview]
Message-ID: <878vb52bsi.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20121017145806.GK3050@adacore.com> (Joel Brobecker's message of "Wed, 17 Oct 2012 07:58:06 -0700")
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> Thanks! I gave it a whirl, JIC, and as you suspected, it does not
Joel> fix the 0xdeadbeef issue on Windows. It looks like a nice improvement,
Joel> however - with maybe one comment which I will send by replying
Joel> to the email...
Thanks.
FWIW the appended builds and regtests ok; but really it needs testing in
your environment.
Tom
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 6e651f6..583329d 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -2037,7 +2037,7 @@ generic_emit_char (int c, struct type *type, struct ui_file *stream,
convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
obstack_base (&wchar_buf),
obstack_object_size (&wchar_buf),
- 1, &output, translit_char);
+ sizeof (gdb_wchar_t), &output, translit_char);
obstack_1grow (&output, '\0');
fputs_filtered (obstack_base (&output), stream);
@@ -2278,7 +2278,7 @@ generic_printstr (struct ui_file *stream, struct type *type,
convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
obstack_base (&wchar_buf),
obstack_object_size (&wchar_buf),
- 1, &output, translit_char);
+ sizeof (gdb_wchar_t), &output, translit_char);
obstack_1grow (&output, '\0');
fputs_filtered (obstack_base (&output), stream);
next prev parent reply other threads:[~2012-10-17 18:28 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 [this message]
2012-10-17 18:43 ` Joel Brobecker
2012-10-17 19:20 ` Tom Tromey
2012-10-16 23:31 ` Joel Brobecker
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=878vb52bsi.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.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