diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-06-13 04:40:34 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-06-13 04:40:34 +0000 |
commit | 9c04cab7f16f8d8a042e5851f8743da434428b6d (patch) | |
tree | d5ae0003cf326a869b74fdc829e538197ee24ffe /gdb/gdbarch.h | |
parent | b060cbeaa43c64be30227bb8d41b033ec5809871 (diff) | |
download | gdb-9c04cab7f16f8d8a042e5851f8743da434428b6d.zip gdb-9c04cab7f16f8d8a042e5851f8743da434428b6d.tar.gz gdb-9c04cab7f16f8d8a042e5851f8743da434428b6d.tar.bz2 |
2003-06-13 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Update comments on registers, re-order.
(deprecated_register_byte): Rename register_byte.
(deprecated_register_raw_size): Rename register_raw_size.
(deprecated_register_virtual_size): Rename register_virtual_size.
(deprecated_register_virtual_type): Rename register_virtual_type.
* gdbarch.h, gdbarch.c: Re-generate.
* xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
* vax-tdep.c (vax_gdbarch_init): Update.
* v850-tdep.c (v850_gdbarch_init): Update.
* sparc-tdep.c (sparc_gdbarch_init): Update.
* sh-tdep.c (sh_gdbarch_init): Update.
* s390-tdep.c (s390_gdbarch_init): Update.
* rs6000-tdep.c (rs6000_gdbarch_init): Update.
* ns32k-tdep.c: Update.
* mn10300-tdep.c (mn10300_gdbarch_init): Update.
* mips-tdep.c (mips_gdbarch_init): Update.
* mcore-tdep.c (mcore_gdbarch_init): Update.
* m68k-tdep.c (m68k_gdbarch_init): Update.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
* ia64-tdep.c (ia64_gdbarch_init): Update.
* hppa-tdep.c (hppa_gdbarch_init): Update.
* h8300-tdep.c (h8300_gdbarch_init): Update.
* frv-tdep.c (frv_gdbarch_init): Update.
* cris-tdep.c (cris_gdbarch_init): Update.
* avr-tdep.c (avr_gdbarch_init): Update.
* alpha-tdep.c (alpha_gdbarch_init): Update.
* arm-tdep.c (arm_gdbarch_init): Update.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 175 |
1 files changed, 90 insertions, 85 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index f45713c..6c0eb3e 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -696,6 +696,8 @@ extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr)) #endif +/* See the dummy frame code. */ + extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch); extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size); #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE) @@ -705,6 +707,54 @@ extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int d #define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch)) #endif +/* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */ + +extern int gdbarch_register_type_p (struct gdbarch *gdbarch); + +typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr); +extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr); +extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type); + +/* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */ + +#if defined (REGISTER_VIRTUAL_TYPE) +/* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */ +#if !defined (REGISTER_VIRTUAL_TYPE_P) +#define REGISTER_VIRTUAL_TYPE_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P) +#define REGISTER_VIRTUAL_TYPE_P() (0) +#endif + +extern int gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P) +#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P) +#define REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE) +#define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0) +#endif + +typedef struct type * (gdbarch_deprecated_register_virtual_type_ftype) (int reg_nr); +extern struct type * gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr); +extern void set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE) +#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE" +#endif +#if !defined (REGISTER_VIRTUAL_TYPE) +#define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_deprecated_register_virtual_type (current_gdbarch, reg_nr)) +#endif + +/* DEPRECATED_REGISTER_BYTES can be deleted. The value is computed + from REGISTER_TYPE. */ + extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch); extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes); #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES) @@ -714,11 +764,12 @@ extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int #define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch)) #endif -/* NOTE: cagney/2002-05-02: This function with predicate has a valid - (callable) initial value. As a consequence, even when the predicate - is false, the corresponding function works. This simplifies the - migration process - old code, calling REGISTER_BYTE, doesn't need to - be modified. */ +/* DEPRECATED_REGISTER_BYTE can be deleted. The value is computed from + REGISTER_TYPE. NOTE: cagney/2002-05-02: This function with + predicate has a valid (callable) initial value. As a consequence, + even when the predicate is false, the corresponding function works. + This simplifies the migration process - old code, calling + DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */ #if defined (REGISTER_BYTE) /* Legacy for systems yet to multi-arch REGISTER_BYTE */ @@ -732,12 +783,12 @@ extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int #define REGISTER_BYTE_P() (0) #endif -extern int gdbarch_register_byte_p (struct gdbarch *gdbarch); +extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch); #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE_P) #error "Non multi-arch definition of REGISTER_BYTE" #endif #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE_P) -#define REGISTER_BYTE_P() (gdbarch_register_byte_p (current_gdbarch)) +#define REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch)) #endif /* Default (function) for non- multi-arch platforms. */ @@ -745,37 +796,54 @@ extern int gdbarch_register_byte_p (struct gdbarch *gdbarch); #define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr)) #endif -typedef int (gdbarch_register_byte_ftype) (int reg_nr); -extern int gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr); -extern void set_gdbarch_register_byte (struct gdbarch *gdbarch, gdbarch_register_byte_ftype *register_byte); +typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr); +extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr); +extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte); #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE) #error "Non multi-arch definition of REGISTER_BYTE" #endif #if !defined (REGISTER_BYTE) -#define REGISTER_BYTE(reg_nr) (gdbarch_register_byte (current_gdbarch, reg_nr)) +#define REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr)) #endif -/* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and - REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */ +/* DEPRECATED_REGISTER_RAW_SIZE can be deleted. The value is computed + from REGISTER_TYPE. */ /* Default (function) for non- multi-arch platforms. */ #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE) #define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr)) #endif -typedef int (gdbarch_register_raw_size_ftype) (int reg_nr); -extern int gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr); -extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_register_raw_size_ftype *register_raw_size); +typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr); +extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr); +extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size); #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE) #error "Non multi-arch definition of REGISTER_RAW_SIZE" #endif #if !defined (REGISTER_RAW_SIZE) -#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_register_raw_size (current_gdbarch, reg_nr)) +#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr)) #endif -/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and - DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by - MAX_REGISTER_SIZE (a constant). */ +/* DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. The value is + computed from REGISTER_TYPE. */ + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE) +#define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr)) +#endif + +typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr); +extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr); +extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE) +#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE" +#endif +#if !defined (REGISTER_VIRTUAL_SIZE) +#define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr)) +#endif + +/* DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been + replaced by the constant MAX_REGISTER_SIZE. */ #if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */ @@ -811,27 +879,8 @@ extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarc #define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch)) #endif -/* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and - REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */ - -/* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE) -#define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr)) -#endif - -typedef int (gdbarch_register_virtual_size_ftype) (int reg_nr); -extern int gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr); -extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_register_virtual_size_ftype *register_virtual_size); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE) -#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE" -#endif -#if !defined (REGISTER_VIRTUAL_SIZE) -#define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_register_virtual_size (current_gdbarch, reg_nr)) -#endif - -/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and - DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by - MAX_REGISTER_SIZE (a constant). */ +/* DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been + replaced by the constant MAX_REGISTER_SIZE. */ #if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */ @@ -867,50 +916,6 @@ extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gd #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch)) #endif -/* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and - REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */ - -#if defined (REGISTER_VIRTUAL_TYPE) -/* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */ -#if !defined (REGISTER_VIRTUAL_TYPE_P) -#define REGISTER_VIRTUAL_TYPE_P() (1) -#endif -#endif - -/* Default predicate for non- multi-arch targets. */ -#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P) -#define REGISTER_VIRTUAL_TYPE_P() (0) -#endif - -extern int gdbarch_register_virtual_type_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P) -#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE" -#endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P) -#define REGISTER_VIRTUAL_TYPE_P() (gdbarch_register_virtual_type_p (current_gdbarch)) -#endif - -/* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE) -#define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0) -#endif - -typedef struct type * (gdbarch_register_virtual_type_ftype) (int reg_nr); -extern struct type * gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr); -extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_register_virtual_type_ftype *register_virtual_type); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE) -#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE" -#endif -#if !defined (REGISTER_VIRTUAL_TYPE) -#define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_register_virtual_type (current_gdbarch, reg_nr)) -#endif - -extern int gdbarch_register_type_p (struct gdbarch *gdbarch); - -typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr); -extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr); -extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type); - #if defined (DEPRECATED_DO_REGISTERS_INFO) /* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */ #if !defined (DEPRECATED_DO_REGISTERS_INFO_P) |