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
- From: Lars Brinkhoff <lars dot spam at nocrew dot org>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: Jim Blandy <jimb at cygnus dot com>, gdb-patches at sources dot redhat dot com
- Date: 20 Dec 2001 09:43:19 +0100
- Subject: Re: RFA: char is unsigned on some architectures
- Organization: nocrew
- References: <20011219224516.AA8665E9D8@zwingli.cygnus.com><3C21194D.4090605@cygnus.com>
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?
--
Lars Brinkhoff http://lars.nocrew.org/ Linux, GCC, PDP-10
Brinkhoff Consulting http://www.brinkhoff.se/ programming