Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: tromey@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: Configuring gdb_wchar.h
Date: Sat, 18 Apr 2009 11:05:00 -0000	[thread overview]
Message-ID: <83ljpyi5ml.fsf@gnu.org> (raw)
In-Reply-To: <m3iql7jiy6.fsf@fleche.redhat.com>

> Cc: gdb-patches@sources.redhat.com
> From: Tom Tromey <tromey@redhat.com>
> Date: Tue, 14 Apr 2009 10:31:13 -0600
> 
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
> 
> Tom> Please try the appended patch.
> 
> Eli> It compiles and links okay, thanks.  Do you want me to test some
> Eli> feature(s) to make sure the resulting binary works as expected?
> 
> Sure.  If you have dejagnu, try charset.exp.

I ran some of the tests in charset.exp by hand, and I see some
potential issues.

For example, when I set the host charset to UTF-8 and the target
charset to EBCDIC-US, I get an error message:

    Cannot convert between character sets `EBCDIC-US' and `UTF-8'

Is this expected?  Is this again a consequence of the list of charsets
not coming from libiconv, but from the default?

Also, this result seems to be different from what charsets.exp
expects:

    Breakpoint 1, main () at charset.c:173
    173        }
    (gdb) set host-charset ASCII
    (gdb) set target-charset ISO-8859-1
    (gdb) print iso_8859_1_string[69]
    $2 = -94 '\242'
    (gdb) print iso_8859_1_string+70
    $3 = 0xbdb6 "\21"
    (gdb) print iso_8859_1_string[70]
    $4 = 17 '\21'

Perhaps I misunderstood, but this part of the test seems to expect
something different, at least for the second and third print commands:

    # Test handling of characters in the target charset which
    # can't be translated into the host charset.
    if {! [string compare $target_charset iso-8859-1]} {
        gdb_test "print iso_8859_1_string\[69\]" \
                 " = \[0-9-\]+ '\\\\242'" \
                 "print character with no equivalent in host character set"
        gdb_test "print iso_8859_1_string + 70" \
                 " = ${hex} \"\\\\242.*\"" \
                 "print string with no equivalent in host character set"
    }

I also noticed that on a GNU/Linux system, "set target-charset TAB"
shows the list of possible charsets with a ^J character at the end of
each line.


  parent reply	other threads:[~2009-04-18 11:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-11 17:53 Eli Zaretskii
2009-04-13 17:54 ` Tom Tromey
2009-04-14 12:03   ` Eli Zaretskii
2009-04-14 16:31     ` Tom Tromey
2009-04-14 17:11       ` Eli Zaretskii
2009-04-14 17:42         ` Tom Tromey
2009-04-14 18:04           ` Eli Zaretskii
2009-04-14 18:15             ` Tom Tromey
2009-04-14 20:17               ` Eli Zaretskii
2009-04-15  0:23                 ` Tom Tromey
2009-04-15 10:06                   ` Eli Zaretskii
2009-04-15 14:01                     ` Eli Zaretskii
2009-04-15 15:14                       ` Tom Tromey
2009-04-15 15:33                         ` Eli Zaretskii
2009-04-15 18:04                           ` Tom Tromey
2009-04-15 19:20                             ` Eli Zaretskii
2009-04-15 19:53                               ` Tom Tromey
2009-04-15 20:18                                 ` Eli Zaretskii
2009-04-18  9:47                                   ` Eli Zaretskii
2009-04-18 17:28                                     ` Tom Tromey
2009-04-19 18:30                                       ` Eli Zaretskii
2009-04-15 15:08                     ` Tom Tromey
2009-04-15 15:12                       ` Pedro Alves
2009-04-15 15:26                         ` Tom Tromey
2009-04-15 15:47                       ` Eli Zaretskii
2009-04-15 18:07                         ` Tom Tromey
2009-04-15 22:13                   ` Tom Tromey
2009-04-18 11:05       ` Eli Zaretskii [this message]
2009-04-18 17:34         ` Tom Tromey
2009-04-18 20:56           ` 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=83ljpyi5ml.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.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