This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] xstormy16-tdep.c: Set chars to unsigned
On Tue, Mar 25, 2003 at 11:28:45AM -0500, Andrew Cagney wrote:
Does this also fix some sizeof.exp failures? That test is ment to check
for this problem.
XStormy16 has no sizeof.exp FAILs.
These tests:
print/d (int) (char) -1
$11 = -1
(gdb) PASS: gdb.base/sizeof.exp: get value of (int) (char) -1 (-1)
print/d (int) (signed char) -1
$12 = -1
(gdb) PASS: gdb.base/sizeof.exp: get value of (int) (signed char) -1 (-1)
print/d (int) (unsigned char) -1
$13 = 255
(gdb) PASS: gdb.base/sizeof.exp: get value of (int) (unsigned char) -1 (255)
next
valueof ((int) (char) -1) == -1
118 printf ("valueof ((int) (signed char) -1) == %d\n", (int)
(signed char) -1);
(gdb) PASS: gdb.base/sizeof.exp: check valueof (int) (char) -1 == -1
next
valueof ((int) (signed char) -1) == -1
119 printf ("valueof ((int) (unsigned char) -1) == %d\n", (int)
(unsigned char) -1);
(gdb) PASS: gdb.base/sizeof.exp: check valueof (int) (signed char) -1 == -1
next
valueof ((int) (unsigned char) -1) == 255
121 return 0;
(gdb) PASS: gdb.base/sizeof.exp: check valueof (int) (unsigned char) -1
== 255
are ment to ensure that GCC/target and GDB have a consistent idea the
signness of a character.
If GDB was getting char's sign wrong, but those tests were passing, then
there is a bug in that test case.
Can you please check this, and expand a little on exactly what the
charsets.exp problem was.
Andrew