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: Andrew Cagney <ac131313 at cygnus dot com>
- To: Jim Blandy <jimb at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 19 Dec 2001 22:48:45 +0000
- Subject: Re: RFA: char is unsigned on some architectures
- References: <20011219224516.AA8665E9D8@zwingli.cygnus.com>
> 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. Want to
add that ``obvious'' tweek?
Andrew