This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: char is unsigned on some architectures
Lars Brinkhoff <lars.spam@nocrew.org> writes:
> Andrew Cagney <ac131313@cygnus.com> writes:
> > > ISO C specifies that `char' acts like either `signed char' or
> > > `unsigned char'. At the moment, GDB assumes that `char' is `signed
> > > char'. This patch allows the architecture to specify the correct
> > > answer, and sets the value correctly for the IBM S/390 architecture.
> > > 2001-12-19 Jim Blandy <jimb@redhat.com>
> > > * gdbarch.sh (TARGET_CHAR_SIGNED): New macro.
> > > * gdbarch.c, gdbarch.h: Regenerated.
> > > * gdbtypes.c (build_gdbtypes): If TARGET_CHAR_SIGNED is zero,
> > > set the TYPE_FLAG_UNSIGNED bit on the type.
> > > * s390-tdep.c (s390_gdbarch_init): On the S/390, characters
> > > are unsigned by default.
> >
> > Hmm, the rs6000 and prodogy (Hmm, IBM ...) are also unsigned.
>
> How about ARM?
I don't know anything about the ARM. If you do, well, it's a one-line
patch. :)