diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-08-11 02:55:38 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-08-11 02:55:38 +0000 |
commit | 66b43ecb0f97cb826fa1595098a8fb0e7dc8a7c9 (patch) | |
tree | 04896aff206f334543ccd6c46e5da6cb15f5113b /gdb/gdbarch.h | |
parent | 6d0285024767ef31d27ee12ca048078824371c39 (diff) | |
download | gdb-66b43ecb0f97cb826fa1595098a8fb0e7dc8a7c9.zip gdb-66b43ecb0f97cb826fa1595098a8fb0e7dc8a7c9.tar.gz gdb-66b43ecb0f97cb826fa1595098a8fb0e7dc8a7c9.tar.bz2 |
Move TARGET_*_PTR to gdbarch.h.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 101 |
1 files changed, 81 insertions, 20 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 819d85c..fb07b93 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -79,29 +79,17 @@ extern int gdbarch_byte_order (struct gdbarch *gdbarch); /* The following are initialized by the target dependant code. */ -/* Default (value) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (TARGET_BFD_VMA_BIT) -#define TARGET_BFD_VMA_BIT (TARGET_ARCHITECTURE->bits_per_address) -#endif - -extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch); -extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit); -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BFD_VMA_BIT) -#define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch)) -#endif -#endif +/* Number of bits in a char or unsigned char for the target machine. + Just like CHAR_BIT in <limits.h> but describes the target machine. + v::TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0: + + Number of bits in a short or unsigned short for the target machine. */ -extern int gdbarch_ptr_bit (struct gdbarch *gdbarch); -extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit); -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PTR_BIT) -#define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch)) -#endif +/* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_SHORT_BIT) +#define TARGET_SHORT_BIT (2*TARGET_CHAR_BIT) #endif -/*v:1:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):0 */ - extern int gdbarch_short_bit (struct gdbarch *gdbarch); extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit); #if GDB_MULTI_ARCH @@ -110,6 +98,13 @@ extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit); #endif #endif +/* Number of bits in an int or unsigned int for the target machine. */ + +/* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_INT_BIT) +#define TARGET_INT_BIT (4*TARGET_CHAR_BIT) +#endif + extern int gdbarch_int_bit (struct gdbarch *gdbarch); extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit); #if GDB_MULTI_ARCH @@ -118,6 +113,13 @@ extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit); #endif #endif +/* Number of bits in a long or unsigned long for the target machine. */ + +/* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_BIT) +#define TARGET_LONG_BIT (4*TARGET_CHAR_BIT) +#endif + extern int gdbarch_long_bit (struct gdbarch *gdbarch); extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit); #if GDB_MULTI_ARCH @@ -126,6 +128,14 @@ extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit); #endif #endif +/* Number of bits in a long long or unsigned long long for the target + machine. */ + +/* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_LONG_BIT) +#define TARGET_LONG_LONG_BIT (2*TARGET_LONG_BIT) +#endif + extern int gdbarch_long_long_bit (struct gdbarch *gdbarch); extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bit); #if GDB_MULTI_ARCH @@ -134,6 +144,13 @@ extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bi #endif #endif +/* Number of bits in a float for the target machine. */ + +/* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_BIT) +#define TARGET_FLOAT_BIT (4*TARGET_CHAR_BIT) +#endif + extern int gdbarch_float_bit (struct gdbarch *gdbarch); extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit); #if GDB_MULTI_ARCH @@ -142,6 +159,13 @@ extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit); #endif #endif +/* Number of bits in a double for the target machine. */ + +/* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_BIT) +#define TARGET_DOUBLE_BIT (8*TARGET_CHAR_BIT) +#endif + extern int gdbarch_double_bit (struct gdbarch *gdbarch); extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit); #if GDB_MULTI_ARCH @@ -150,6 +174,13 @@ extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit); #endif #endif +/* Number of bits in a long double for the target machine. */ + +/* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_BIT) +#define TARGET_LONG_DOUBLE_BIT (2*TARGET_DOUBLE_BIT) +#endif + extern int gdbarch_long_double_bit (struct gdbarch *gdbarch); extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_double_bit); #if GDB_MULTI_ARCH @@ -158,6 +189,36 @@ extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_doubl #endif #endif +/* Number of bits in a pointer for the target machine */ + +/* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_PTR_BIT) +#define TARGET_PTR_BIT (TARGET_INT_BIT) +#endif + +extern int gdbarch_ptr_bit (struct gdbarch *gdbarch); +extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit); +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PTR_BIT) +#define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch)) +#endif +#endif + +/* Number of bits in a BFD_VMA for the target object file format. */ + +/* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_BFD_VMA_BIT) +#define TARGET_BFD_VMA_BIT (TARGET_ARCHITECTURE->bits_per_address) +#endif + +extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch); +extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit); +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BFD_VMA_BIT) +#define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch)) +#endif +#endif + /* Default (value) for non- multi-arch platforms. */ #if (!GDB_MULTI_ARCH) && !defined (IEEE_FLOAT) #define IEEE_FLOAT (0) |