From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>,
gdb-patches@sourceware.org
Subject: [patch] Regression on py-prettyprint.exp: print estring [Re: Your INTERMEDIATE_ENCODING patch for Solaris]
Date: Thu, 16 Sep 2010 17:51:00 -0000 [thread overview]
Message-ID: <20100916094921.GA5781@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <m3aaniwykg.fsf@fleche.redhat.com>
On Wed, 15 Sep 2010 22:18:07 +0200, Tom Tromey wrote:
> Great. Here is what I am checking in.
>
> 2010-09-15 Tom Tromey <tromey@redhat.com>
>
> * charset.c (iconv_open): New define.
> (iconv): Likewise.
> (iconv_close): Likewise.
> (phony_iconv_open): Add "phony_" prefix.
> (phony_iconv_close): Likewise.
> (phony_iconv): Likewise.
> * gdb_wchar.h: Check _LIBICONV_VERSION, __STDC_ISO_10646__.
> Change how INTERMEDIATE_ENCODING is defined.
562fabbaa40fe9e601eddc2e0ab3c8cc615cf9a3
This patch has a regression on all the tested OSes
{x86_64,x86_64-m32,i686}-fedora{12,13,14snapshot}-linux-gnu:
(gdb) print estring
$7 = "embedded x\201\202\203\204"
PASS: gdb.python/py-prettyprint.exp: print estring
->
(gdb) print estring
$7 = "embedded \201\202\203\204"
(gdb) FAIL: gdb.python/py-prettyprint.exp: print estring
due to the change:
INTERMEDIATE_ENCODING = "wchar_t"
->
INTERMEDIATE_ENCODING = "UCS-4LE"
echo 'char s[]="ab\201";'|gcc -o 1.o -c -g -x c -;./gdb -nx -q -ex 'p s' -ex q ./1.o
$1 = "ab\201"
->
$1 = "a\201"
The fix has no regressions on
{x86_64,x86_64-m32,i686}-fedora14snapshot-linux-gnu.
Test OpenSolaris 2009.06 snv_111b X86 shows no problem even with FSF GDB HEAD;
there was no libiconv so charset.exp is UNTESTED.
(I did not try GNU libiconv on OpenSolaris).
The fix seems generally correct to me anyway. The conversion may not stop
when it seens no more output space as the input may no longer produce any
output. It is more questionable why wchar_t worked (and how is it different
in glibc iconv).
Thanks,
Jan
gdb/
2010-09-16 Jan Kratochvil <jan.kratochvil@redhat.com>
* charset.c (wchar_iterate) <EILSEQ>: Return any possibly converted
characters.
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -648,8 +648,13 @@ wchar_iterate (struct wchar_iterator *iter,
switch (errno)
{
case EILSEQ:
- /* Invalid input sequence. Skip it, and let the caller
- know about it. */
+ /* Invalid input sequence. We still might have converted a
+ character; if so, return it. */
+ if (out_avail < out_request * sizeof (gdb_wchar_t))
+ break;
+
+ /* Otherwise skip the first invalid character, and let the
+ caller know about it. */
*out_result = wchar_iterate_invalid;
*ptr = iter->input;
*len = iter->width;
next prev parent reply other threads:[~2010-09-16 9:49 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-31 16:25 Your INTERMEDIATE_ENCODING patch for Solaris Kazu Hirata
2010-08-05 18:40 ` Tom Tromey
2010-08-10 20:28 ` Daniel Jacobowitz
2010-08-17 18:06 ` Tom Tromey
2010-08-17 18:44 ` Joel Brobecker
2010-08-17 19:03 ` Tom Tromey
2010-08-18 10:14 ` Joel Brobecker
2010-08-18 14:43 ` Pierre Muller
2010-08-18 14:52 ` Joel Brobecker
2010-08-18 15:10 ` Pierre Muller
2010-08-18 15:35 ` Tom Tromey
2010-08-18 15:44 ` Tom Tromey
2010-08-18 16:36 ` Joel Brobecker
2010-08-18 17:35 ` Tom Tromey
2010-08-18 17:41 ` Joel Brobecker
[not found] ` <15264.6257346079$1282142643@news.gmane.org>
2010-08-18 16:12 ` Tom Tromey
2010-08-19 15:03 ` Pierre Muller
2010-08-19 16:09 ` Tom Tromey
2010-08-30 18:01 ` Tom Tromey
2010-08-31 9:25 ` Pierre Muller
2010-08-31 16:47 ` Tom Tromey
2010-09-01 7:30 ` Pierre Muller
[not found] ` <44796.6229789474$1283326243@news.gmane.org>
2010-09-01 22:35 ` Tom Tromey
2010-09-02 14:21 ` Pierre Muller
2010-09-02 15:39 ` Tom Tromey
2010-09-14 21:29 ` Tom Tromey
2010-09-15 17:20 ` Pierre Muller
2010-09-16 7:55 ` Tom Tromey
2010-09-16 9:49 ` Pierre Muller
2010-09-16 20:22 ` Tom Tromey
2010-09-16 22:31 ` Pierre Muller
[not found] ` <20078.2261243605$1284672670@news.gmane.org>
2010-09-17 9:21 ` Tom Tromey
2010-09-17 13:48 ` Pierre Muller
2010-09-23 13:00 ` Tom Tromey
2010-09-23 14:48 ` Pierre Muller
2010-09-27 18:42 ` Tom Tromey
2010-09-16 17:51 ` Jan Kratochvil [this message]
2010-09-16 20:33 ` [patch] Regression on py-prettyprint.exp: print estring [Re: Your INTERMEDIATE_ENCODING patch for Solaris] Tom Tromey
2010-09-16 20:44 ` Jan Kratochvil
2010-08-18 11:52 ` Your INTERMEDIATE_ENCODING patch for Solaris Pierre Muller
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=20100916094921.GA5781@host1.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
--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