From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] xstormy16-tdep.c: Set chars to unsigned
Date: Tue, 25 Mar 2003 17:07:00 -0000 [thread overview]
Message-ID: <20030325170703.GM23762@cygbert.vinschen.de> (raw)
In-Reply-To: <3E8089A9.8070805@redhat.com>
On Tue, Mar 25, 2003 at 11:54:01AM -0500, Andrew Cagney wrote:
> >On Tue, Mar 25, 2003 at 11:28:45AM -0500, Andrew Cagney wrote:
> These tests:
>
> print/d (int) (char) -1
> $11 = -1
> [...]
are looking pretty normal:
print/d (int) (char) -1^M
$11 = 255^M
(gdb) PASS: gdb.base/sizeof.exp: get value of (int) (char) -1 (255)
print/d (int) (signed char) -1^M
$12 = -1^M
(gdb) PASS: gdb.base/sizeof.exp: get value of (int) (signed char) -1 (-1)
print/d (int) (unsigned char) -1^M
$13 = 255^M
(gdb) PASS: gdb.base/sizeof.exp: get value of (int) (unsigned char) -1 (255)
next^M
valueof ((int) (char) -1) == 255^M
118 printf ("valueof ((int) (signed char) -1) == %d\n", (int) (signed char) -1);^M
(gdb) PASS: gdb.base/sizeof.exp: check valueof (int) (char) -1 == 255
next^M
valueof ((int) (signed char) -1) == -1^M
119 printf ("valueof ((int) (unsigned char) -1) == %d\n", (int) (unsigned char) -1);^M
(gdb) PASS: gdb.base/sizeof.exp: check valueof (int) (signed char) -1 == -1
next^M
valueof ((int) (unsigned char) -1) == 255^M
121 return 0;^M
> Can you please check this, and expand a little on exactly what the
> charsets.exp problem was.
The characters returned from the application's strings were unsigned,
the characters evaluated in gdb internally were signed e. g.:
print 'A'^M
$3 = -63 'A'^M
(gdb) PASS: gdb.base/charset.exp: parse character literal in ibm1047
print 'A' == ibm1047_string[8]^M
$4 = 0^M
(gdb) FAIL: gdb.base/charset.exp: check value of parsed character literal in ibm1047
This is solved with my patch.
Corinna
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com
next prev parent reply other threads:[~2003-03-25 17:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-25 16:18 Corinna Vinschen
2003-03-25 16:28 ` Andrew Cagney
2003-03-25 16:36 ` Corinna Vinschen
2003-03-25 16:54 ` Andrew Cagney
2003-03-25 17:07 ` Corinna Vinschen [this message]
2003-03-25 23:24 ` Andrew Cagney
2003-03-26 9:13 ` Corinna Vinschen
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=20030325170703.GM23762@cygbert.vinschen.de \
--to=vinschen@redhat.com \
--cc=gdb-patches@sources.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