diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-12-20 03:26:08 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-12-20 03:26:08 +0000 |
commit | 4e40929968103f27fba096429d4df7e1be8b80e6 (patch) | |
tree | 089bb00c6ba305f22a3745efd81aecdee053f56b /gdb/gdbarch.h | |
parent | 3695c2997d939be2c281d498c1b232805b4cb09b (diff) | |
download | gdb-4e40929968103f27fba096429d4df7e1be8b80e6.zip gdb-4e40929968103f27fba096429d4df7e1be8b80e6.tar.gz gdb-4e40929968103f27fba096429d4df7e1be8b80e6.tar.bz2 |
* 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.
* rs6000-tdep.c (rs6000_gdbarch_init): Same for PowerPC and
RS6000.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 21e5317..84e5c16 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -287,6 +287,24 @@ extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit); #endif #endif +/* One if `char' acts like `signed char', zero if `unsigned char'. */ + +/* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_CHAR_SIGNED) +#define TARGET_CHAR_SIGNED (1) +#endif + +extern int gdbarch_char_signed (struct gdbarch *gdbarch); +extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED) +#error "Non multi-arch definition of TARGET_CHAR_SIGNED" +#endif +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_CHAR_SIGNED) +#define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch)) +#endif +#endif + /* Default (value) for non- multi-arch platforms. */ #if (!GDB_MULTI_ARCH) && !defined (IEEE_FLOAT) #define IEEE_FLOAT (0) |