summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-03 20:50:20 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-03 20:50:20 +0000
commitd23526abe5137029bf7bac69f59eeb71385ba44a (patch)
tree8e4a4969c2695018ce7220eb352da9d0ffc61d8c
parent0db18c3fb56d5818a0ea9e5f5c89e47f41f02ced (diff)
downloadgdb-d23526abe5137029bf7bac69f59eeb71385ba44a.tar.gz
2003-03-03 Andrew Cagney <cagney@redhat.com>cagney_offbyone-20030303-branchpoint
Make MAX_REGISTER_RAW_SIZE and MAX_REGISTER_VIRTUAL_SIZE optional. * gdbarch.sh (DEPRECATED_MAX_REGISTER_RAW_SIZE): Variable with predicate. Replace MAX_REGISTER_RAW_SIZE. (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Ditto for MAX_REGISTER_VIRTUAL_SIZE. * regcache.c (legacy_max_register_raw_size): New function. (legacy_max_register_virtual_size): New function. * defs.h (MAX_REGISTER_VIRTUAL_SIZE): Define. (MAX_REGISTER_RAW_SIZE): Define. (legacy_max_register_raw_size): Declare. (legacy_max_register_virtual_size): Declare. * config/sparc/tm-sparc.h (DEPRECATED_MAX_REGISTER_RAW_SIZE) (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Update. * config/sparc/tm-sp64.h (DEPRECATED_MAX_REGISTER_RAW_SIZE) (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Ditto. * config/pa/tm-hppa.h (DEPRECATED_MAX_REGISTER_RAW_SIZE) (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Ditto. * config/pa/tm-hppa64.h (DEPRECATED_MAX_REGISTER_RAW_SIZE): Ditto. * config/ia64/tm-ia64.h (DEPRECATED_MAX_REGISTER_RAW_SIZE): Ditto. * config/i386/tm-ptx.h (DEPRECATED_MAX_REGISTER_RAW_SIZE): Ditto. * 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 (ns32k_gdbarch_init): 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. * i386-tdep.c (i386_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. * arm-tdep.c (arm_gdbarch_init): Update. * alpha-tdep.c (alpha_gdbarch_init): Update. * d10v-tdep.c (d10v_gdbarch_init): Do not set max_register_raw_size or max_register_virtual_size.
-rw-r--r--gdb/ChangeLog47
-rw-r--r--gdb/alpha-tdep.c4
-rw-r--r--gdb/arm-tdep.c4
-rw-r--r--gdb/avr-tdep.c4
-rw-r--r--gdb/config/i386/tm-ptx.h4
-rw-r--r--gdb/config/ia64/tm-ia64.h2
-rw-r--r--gdb/config/pa/tm-hppa.h4
-rw-r--r--gdb/config/pa/tm-hppa64.h4
-rw-r--r--gdb/config/sparc/tm-sp64.h8
-rw-r--r--gdb/config/sparc/tm-sparc.h4
-rw-r--r--gdb/cris-tdep.c4
-rw-r--r--gdb/d10v-tdep.c2
-rw-r--r--gdb/defs.h23
-rw-r--r--gdb/frv-tdep.c4
-rw-r--r--gdb/gdbarch.c108
-rw-r--r--gdb/gdbarch.h74
-rwxr-xr-xgdb/gdbarch.sh4
-rw-r--r--gdb/h8300-tdep.c4
-rw-r--r--gdb/hppa-tdep.c4
-rw-r--r--gdb/i386-tdep.c4
-rw-r--r--gdb/ia64-tdep.c4
-rw-r--r--gdb/m68hc11-tdep.c4
-rw-r--r--gdb/m68k-tdep.c4
-rw-r--r--gdb/mcore-tdep.c4
-rw-r--r--gdb/mips-tdep.c4
-rw-r--r--gdb/mn10300-tdep.c4
-rw-r--r--gdb/ns32k-tdep.c4
-rw-r--r--gdb/regcache.c18
-rw-r--r--gdb/rs6000-tdep.c4
-rw-r--r--gdb/s390-tdep.c4
-rw-r--r--gdb/sh-tdep.c16
-rw-r--r--gdb/sparc-tdep.c4
-rw-r--r--gdb/v850-tdep.c4
-rw-r--r--gdb/vax-tdep.c4
-rw-r--r--gdb/xstormy16-tdep.c4
35 files changed, 279 insertions, 123 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3a544ea0aff..49ad68fb93c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,50 @@
+2003-03-03 Andrew Cagney <cagney@redhat.com>
+
+ Make MAX_REGISTER_RAW_SIZE and MAX_REGISTER_VIRTUAL_SIZE optional.
+ * gdbarch.sh (DEPRECATED_MAX_REGISTER_RAW_SIZE): Variable with
+ predicate. Replace MAX_REGISTER_RAW_SIZE.
+ (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Ditto for
+ MAX_REGISTER_VIRTUAL_SIZE.
+ * regcache.c (legacy_max_register_raw_size): New function.
+ (legacy_max_register_virtual_size): New function.
+ * defs.h (MAX_REGISTER_VIRTUAL_SIZE): Define.
+ (MAX_REGISTER_RAW_SIZE): Define.
+ (legacy_max_register_raw_size): Declare.
+ (legacy_max_register_virtual_size): Declare.
+ * config/sparc/tm-sparc.h (DEPRECATED_MAX_REGISTER_RAW_SIZE)
+ (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Update.
+ * config/sparc/tm-sp64.h (DEPRECATED_MAX_REGISTER_RAW_SIZE)
+ (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Ditto.
+ * config/pa/tm-hppa.h (DEPRECATED_MAX_REGISTER_RAW_SIZE)
+ (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Ditto.
+ * config/pa/tm-hppa64.h (DEPRECATED_MAX_REGISTER_RAW_SIZE): Ditto.
+ * config/ia64/tm-ia64.h (DEPRECATED_MAX_REGISTER_RAW_SIZE): Ditto.
+ * config/i386/tm-ptx.h (DEPRECATED_MAX_REGISTER_RAW_SIZE): Ditto.
+ * 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 (ns32k_gdbarch_init): 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.
+ * i386-tdep.c (i386_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.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+ * d10v-tdep.c (d10v_gdbarch_init): Do not set
+ max_register_raw_size or max_register_virtual_size.
+
2003-03-03 David Carlton <carlton@math.stanford.edu>
* symtab.h (DEPRECATED_SYMBOL_MATCHES_NAME): Rename from
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 33dd4b8ed62..3d1d96ea4bf 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1819,9 +1819,9 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, ALPHA_REGISTER_BYTES);
set_gdbarch_register_byte (gdbarch, alpha_register_byte);
set_gdbarch_register_raw_size (gdbarch, alpha_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, ALPHA_MAX_REGISTER_RAW_SIZE);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, ALPHA_MAX_REGISTER_RAW_SIZE);
set_gdbarch_register_virtual_size (gdbarch, alpha_register_virtual_size);
- set_gdbarch_max_register_virtual_size (gdbarch,
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
ALPHA_MAX_REGISTER_VIRTUAL_SIZE);
set_gdbarch_register_virtual_type (gdbarch, alpha_register_virtual_type);
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index ebd25948ad8..11b23507f5f 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -2950,8 +2950,8 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_num_regs (gdbarch, NUM_GREGS + NUM_FREGS + NUM_SREGS);
set_gdbarch_register_raw_size (gdbarch, arm_register_raw_size);
set_gdbarch_register_virtual_size (gdbarch, arm_register_virtual_size);
- set_gdbarch_max_register_raw_size (gdbarch, FP_REGISTER_RAW_SIZE);
- set_gdbarch_max_register_virtual_size (gdbarch, FP_REGISTER_VIRTUAL_SIZE);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, FP_REGISTER_RAW_SIZE);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, FP_REGISTER_VIRTUAL_SIZE);
set_gdbarch_register_virtual_type (gdbarch, arm_register_type);
/* Internal <-> external register number maps. */
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 0438750df80..952b4e4c7b7 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1160,9 +1160,9 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, AVR_NUM_REG_BYTES);
set_gdbarch_register_byte (gdbarch, avr_register_byte);
set_gdbarch_register_raw_size (gdbarch, avr_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, 4);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
set_gdbarch_register_virtual_size (gdbarch, avr_register_virtual_size);
- set_gdbarch_max_register_virtual_size (gdbarch, 4);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
set_gdbarch_register_virtual_type (gdbarch, avr_register_virtual_type);
set_gdbarch_print_insn (gdbarch, print_insn_avr);
diff --git a/gdb/config/i386/tm-ptx.h b/gdb/config/i386/tm-ptx.h
index 6a7529887ba..80026e3568e 100644
--- a/gdb/config/i386/tm-ptx.h
+++ b/gdb/config/i386/tm-ptx.h
@@ -136,8 +136,8 @@ extern int ptx_register_u_addr (int, int);
/* Largest value REGISTER_RAW_SIZE can have. */
-#undef MAX_REGISTER_RAW_SIZE
-#define MAX_REGISTER_RAW_SIZE 10
+#undef DEPRECATED_MAX_REGISTER_RAW_SIZE
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE 10
/* Nonzero if register N requires conversion
from raw format to virtual format. */
diff --git a/gdb/config/ia64/tm-ia64.h b/gdb/config/ia64/tm-ia64.h
index d08e59bccd5..9ebe9ae7a9a 100644
--- a/gdb/config/ia64/tm-ia64.h
+++ b/gdb/config/ia64/tm-ia64.h
@@ -66,7 +66,7 @@
/* Largest value REGISTER_RAW_SIZE can have. */
-#define MAX_REGISTER_RAW_SIZE 16
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE 16
#define GDBSERVER_RESUME_REGS { IA64_IP_REGNUM, IA64_PSR_REGNUM, SP_REGNUM, IA64_BSP_REGNUM, IA64_CFM_REGNUM }
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index f3c3fefe29f..dc23a631b35 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -302,13 +302,13 @@ extern int hppa_register_byte (int reg_nr);
/* Largest value REGISTER_RAW_SIZE can have. */
#if !GDB_MULTI_ARCH
-#define MAX_REGISTER_RAW_SIZE 4
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE 4
#endif
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
#if !GDB_MULTI_ARCH
-#define MAX_REGISTER_VIRTUAL_SIZE 8
+#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE 8
#endif
#if !GDB_MULTI_ARCH
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index 775055f4a1f..e6177b05943 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -51,8 +51,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Largest value REGISTER_RAW_SIZE can have. */
-#undef MAX_REGISTER_RAW_SIZE
-#define MAX_REGISTER_RAW_SIZE 8
+#undef DEPRECATED_MAX_REGISTER_RAW_SIZE
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE 8
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h
index e8f565692c0..691e38f4e1e 100644
--- a/gdb/config/sparc/tm-sp64.h
+++ b/gdb/config/sparc/tm-sp64.h
@@ -400,14 +400,14 @@ extern void sp64_extract_return_value (struct type *, char[], char *, int);
/* Largest value REGISTER_RAW_SIZE can have. */
/* tm-sparc.h defines this as 8, but play it safe. */
-#undef MAX_REGISTER_RAW_SIZE
-#define MAX_REGISTER_RAW_SIZE 8
+#undef DEPRECATED_MAX_REGISTER_RAW_SIZE
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE 8
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
/* tm-sparc.h defines this as 8, but play it safe. */
-#undef MAX_REGISTER_VIRTUAL_SIZE
-#define MAX_REGISTER_VIRTUAL_SIZE 8
+#undef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
+#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE 8
/* Return the GDB type object for the "standard" data type
of data in register N. */
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index f38252e00cb..20d5b376929 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -227,11 +227,11 @@ extern int sparc_intreg_size (void);
/* Largest value REGISTER_RAW_SIZE can have. */
-#define MAX_REGISTER_RAW_SIZE 8
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE 8
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-#define MAX_REGISTER_VIRTUAL_SIZE 8
+#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE 8
/* Return the GDB type object for the "standard" data type
of data in register N. */
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 2adef313cd7..a51f98ce43d 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -4243,13 +4243,13 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_raw_size (gdbarch, cris_register_size);
/* The largest value REGISTER_RAW_SIZE can have. */
- set_gdbarch_max_register_raw_size (gdbarch, 32);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 32);
/* The length of the registers in the program's representation. */
set_gdbarch_register_virtual_size (gdbarch, cris_register_size);
/* The largest value REGISTER_VIRTUAL_SIZE can have. */
- set_gdbarch_max_register_virtual_size (gdbarch, 32);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 32);
set_gdbarch_register_virtual_type (gdbarch, cris_register_virtual_type);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 3c1852a256b..addf9caee96 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -1649,9 +1649,7 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, (d10v_num_regs - 2) * 2 + 16);
set_gdbarch_register_byte (gdbarch, d10v_register_byte);
set_gdbarch_register_raw_size (gdbarch, d10v_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, 8);
set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
- set_gdbarch_max_register_virtual_size (gdbarch, 8);
set_gdbarch_register_type (gdbarch, d10v_register_type);
set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
diff --git a/gdb/defs.h b/gdb/defs.h
index 6ae409c1852..1cd32c00e7f 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1083,6 +1083,29 @@ extern void *alloca ();
#include "arch-utils.h"
#endif
+/* FIXME: cagney/2003-03-01: Hack to prop up old targets while they
+ migrate to the overhauled register cache.
+
+ The problem is that some architectures specify different sized raw
+ and cooked (nee virtual) register sizes. They shouldn't. Instead,
+ all architectures should just implement a gdbarch_register_type().
+ That can be used to compute all needed register attributes. While
+ waiting for the conversion, provide compatibility macros that keep
+ old code working. */
+
+#ifdef MAX_REGISTER_RAW_SIZE
+#error MAX_REGISTER_RAW_SIZE defined
+#endif
+extern int legacy_max_register_raw_size (void);
+#define MAX_REGISTER_RAW_SIZE legacy_max_register_raw_size ()
+
+#ifdef MAX_REGISTER_VIRTUAL_SIZE
+#error MAX_REGISTER_VIRTUAL_SIZE defined
+#endif
+extern int legacy_max_register_virtual_size (void);
+#define MAX_REGISTER_VIRTUAL_SIZE legacy_max_register_virtual_size ()
+
+
/* Static target-system-dependent parameters for GDB. */
/* Number of bits in a char or unsigned char for the target machine.
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index c085b2a050a..d27970724bf 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1066,9 +1066,9 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, frv_num_regs * 4);
set_gdbarch_register_byte (gdbarch, frv_register_byte);
set_gdbarch_register_raw_size (gdbarch, frv_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, 4);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
set_gdbarch_register_virtual_size (gdbarch, frv_register_virtual_size);
- set_gdbarch_max_register_virtual_size (gdbarch, 4);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
set_gdbarch_register_virtual_type (gdbarch, frv_register_virtual_type);
set_gdbarch_skip_prologue (gdbarch, frv_skip_prologue);
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 1dcdb938faa..68247d6892d 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -170,9 +170,9 @@ struct gdbarch
int register_bytes;
gdbarch_register_byte_ftype *register_byte;
gdbarch_register_raw_size_ftype *register_raw_size;
- int max_register_raw_size;
+ int deprecated_max_register_raw_size;
gdbarch_register_virtual_size_ftype *register_virtual_size;
- int max_register_virtual_size;
+ int deprecated_max_register_virtual_size;
gdbarch_register_virtual_type_ftype *register_virtual_type;
gdbarch_register_type_ftype *register_type;
gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
@@ -519,9 +519,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->register_bytes = -1;
current_gdbarch->register_byte = generic_register_byte;
current_gdbarch->register_raw_size = generic_register_size;
- current_gdbarch->max_register_raw_size = -1;
current_gdbarch->register_virtual_size = generic_register_size;
- current_gdbarch->max_register_virtual_size = -1;
current_gdbarch->print_registers_info = default_print_registers_info;
current_gdbarch->register_sim_regno = legacy_register_sim_regno;
current_gdbarch->cannot_fetch_register = cannot_register_not;
@@ -661,13 +659,9 @@ verify_gdbarch (struct gdbarch *gdbarch)
fprintf_unfiltered (log, "\n\tregister_bytes");
/* Skip verify of register_byte, invalid_p == 0 */
/* Skip verify of register_raw_size, invalid_p == 0 */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->max_register_raw_size == -1))
- fprintf_unfiltered (log, "\n\tmax_register_raw_size");
+ /* Skip verify of deprecated_max_register_raw_size, has predicate */
/* Skip verify of register_virtual_size, invalid_p == 0 */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->max_register_virtual_size == -1))
- fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
+ /* Skip verify of deprecated_max_register_virtual_size, has predicate */
/* Skip verify of register_virtual_type, has predicate */
/* Skip verify of register_type, has predicate */
/* Skip verify of deprecated_do_registers_info, has predicate */
@@ -1256,6 +1250,40 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_init_frame_pc_first
/*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
#endif
+#ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
+ XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
+ DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
+#endif
+#ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
+ XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
+ DEPRECATED_MAX_REGISTER_RAW_SIZE);
+#endif
+#ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
+ XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
+ DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
+#endif
+#ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
+ XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
+ DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
+#endif
#ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1687,22 +1715,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->in_solib_return_trampoline
/*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
#endif
-#ifdef MAX_REGISTER_RAW_SIZE
- fprintf_unfiltered (file,
- "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
- XSTRING (MAX_REGISTER_RAW_SIZE));
- fprintf_unfiltered (file,
- "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
- MAX_REGISTER_RAW_SIZE);
-#endif
-#ifdef MAX_REGISTER_VIRTUAL_SIZE
- fprintf_unfiltered (file,
- "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
- XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
- fprintf_unfiltered (file,
- "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
- MAX_REGISTER_VIRTUAL_SIZE);
-#endif
#ifdef MEMORY_INSERT_BREAKPOINT
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -3306,22 +3318,26 @@ set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
}
int
-gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
+gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_max_register_raw_size != 0;
+}
+
+int
+gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->max_register_raw_size == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_max_register_raw_size invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
- return gdbarch->max_register_raw_size;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
+ return gdbarch->deprecated_max_register_raw_size;
}
void
-set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
- int max_register_raw_size)
+set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
+ int deprecated_max_register_raw_size)
{
- gdbarch->max_register_raw_size = max_register_raw_size;
+ gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
}
int
@@ -3344,22 +3360,26 @@ set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
}
int
-gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
+gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_max_register_virtual_size != 0;
+}
+
+int
+gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->max_register_virtual_size == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_max_register_virtual_size invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
- return gdbarch->max_register_virtual_size;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
+ return gdbarch->deprecated_max_register_virtual_size;
}
void
-set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
- int max_register_virtual_size)
+set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
+ int deprecated_max_register_virtual_size)
{
- gdbarch->max_register_virtual_size = max_register_virtual_size;
+ gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
}
int
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 099a7b91365..59dd3d60a0e 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -748,14 +748,39 @@ extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_regi
REGISTER_VIRTUAL_SIZE and REGISTER_RAW_SIZE are all being replaced
by REGISTER_TYPE. */
-extern int gdbarch_max_register_raw_size (struct gdbarch *gdbarch);
-extern void set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch, int max_register_raw_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_RAW_SIZE)
-#error "Non multi-arch definition of MAX_REGISTER_RAW_SIZE"
+#if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
+/* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */
+#if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (0)
+#endif
+
+extern int gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
+#error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_max_register_raw_size_p (current_gdbarch))
+#endif
+
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE (0)
+#endif
+
+extern int gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch, int deprecated_max_register_raw_size);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
+#error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_RAW_SIZE)
-#define MAX_REGISTER_RAW_SIZE (gdbarch_max_register_raw_size (current_gdbarch))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch))
#endif
#endif
@@ -786,14 +811,39 @@ extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_
REGISTER_VIRTUAL_SIZE and REGISTER_RAW_SIZE are all being replaced
by REGISTER_TYPE. */
-extern int gdbarch_max_register_virtual_size (struct gdbarch *gdbarch);
-extern void set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch, int max_register_virtual_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_VIRTUAL_SIZE)
-#error "Non multi-arch definition of MAX_REGISTER_VIRTUAL_SIZE"
+#if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
+/* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */
+#if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
+#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
+#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (0)
+#endif
+
+extern int gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
+#error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
+#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_max_register_virtual_size_p (current_gdbarch))
+#endif
+
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
+#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (0)
+#endif
+
+extern int gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch, int deprecated_max_register_virtual_size);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
+#error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_VIRTUAL_SIZE)
-#define MAX_REGISTER_VIRTUAL_SIZE (gdbarch_max_register_virtual_size (current_gdbarch))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
+#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch))
#endif
#endif
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 06e55be2a06..12953c286d3 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -479,7 +479,7 @@ f:2:REGISTER_RAW_SIZE:int:register_raw_size:int reg_nr:reg_nr::generic_register_
# MAX_REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE,
# REGISTER_VIRTUAL_SIZE and REGISTER_RAW_SIZE are all being replaced
# by REGISTER_TYPE.
-v:2:MAX_REGISTER_RAW_SIZE:int:max_register_raw_size::::0:-1
+V:2:DEPRECATED_MAX_REGISTER_RAW_SIZE:int:deprecated_max_register_raw_size
# The methods REGISTER_VIRTUAL_TYPE, MAX_REGISTER_RAW_SIZE,
# MAX_REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE,
# REGISTER_VIRTUAL_SIZE and REGISTER_RAW_SIZE are all being replaced
@@ -489,7 +489,7 @@ f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::generic_r
# MAX_REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE,
# REGISTER_VIRTUAL_SIZE and REGISTER_RAW_SIZE are all being replaced
# by REGISTER_TYPE.
-v:2:MAX_REGISTER_VIRTUAL_SIZE:int:max_register_virtual_size::::0:-1
+V:2:DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE:int:deprecated_max_register_virtual_size
# The methods REGISTER_VIRTUAL_TYPE, MAX_REGISTER_RAW_SIZE,
# MAX_REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE,
# REGISTER_VIRTUAL_SIZE and REGISTER_RAW_SIZE have all being replaced
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index ee687a5bfcf..b90f6ed3abe 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1108,9 +1108,9 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, E_NUM_REGS * BINWORD);
set_gdbarch_register_byte (gdbarch, h8300_register_byte);
set_gdbarch_register_raw_size (gdbarch, h8300_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, h8300h_reg_size);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, h8300h_reg_size);
set_gdbarch_register_virtual_size (gdbarch, h8300_register_raw_size);
- set_gdbarch_max_register_virtual_size (gdbarch, h8300h_reg_size);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, h8300h_reg_size);
set_gdbarch_register_virtual_type (gdbarch, h8300_register_virtual_type);
set_gdbarch_print_registers_info (gdbarch, h8300_print_registers_info);
set_gdbarch_print_float_info (gdbarch, h8300_print_float_info);
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 76ded7be083..9ba5ef903dc 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -4995,8 +4995,8 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, hppa_num_regs * 4);
set_gdbarch_register_byte (gdbarch, hppa_register_byte);
set_gdbarch_register_virtual_size (gdbarch, hppa_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, 4);
- set_gdbarch_max_register_virtual_size (gdbarch, 8);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
set_gdbarch_register_virtual_type (gdbarch, hppa_register_virtual_type);
set_gdbarch_store_struct_return (gdbarch, hppa_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch,
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 005a052cbf8..018f073f2c6 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1558,8 +1558,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, i386_register_name);
set_gdbarch_register_size (gdbarch, 4);
set_gdbarch_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
- set_gdbarch_max_register_raw_size (gdbarch, I386_MAX_REGISTER_SIZE);
- set_gdbarch_max_register_virtual_size (gdbarch, I386_MAX_REGISTER_SIZE);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, I386_MAX_REGISTER_SIZE);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, I386_MAX_REGISTER_SIZE);
set_gdbarch_register_virtual_type (gdbarch, i386_register_virtual_type);
set_gdbarch_print_float_info (gdbarch, i387_print_float_info);
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index f3fb1c90260..36036f2238a 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -2184,9 +2184,9 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, ia64_num_regs * 8 + 128*8);
set_gdbarch_register_byte (gdbarch, ia64_register_byte);
set_gdbarch_register_raw_size (gdbarch, ia64_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, 16);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 16);
set_gdbarch_register_virtual_size (gdbarch, ia64_register_virtual_size);
- set_gdbarch_max_register_virtual_size (gdbarch, 16);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 16);
set_gdbarch_register_virtual_type (gdbarch, ia64_register_virtual_type);
set_gdbarch_skip_prologue (gdbarch, ia64_skip_prologue);
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index fd325326a13..6af823e5bd9 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1360,8 +1360,8 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
/* Set register info. */
set_gdbarch_fp0_regnum (gdbarch, -1);
- set_gdbarch_max_register_raw_size (gdbarch, 2);
- set_gdbarch_max_register_virtual_size (gdbarch, 2);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 2);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 2);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, m68hc11_frame_init_saved_regs);
set_gdbarch_frame_args_skip (gdbarch, 0);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 686c206622a..6008a62205c 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1021,8 +1021,8 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_raw_size (gdbarch, m68k_register_raw_size);
set_gdbarch_register_virtual_size (gdbarch, m68k_register_virtual_size);
- set_gdbarch_max_register_raw_size (gdbarch, 12);
- set_gdbarch_max_register_virtual_size (gdbarch, 12);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 12);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 12);
set_gdbarch_register_virtual_type (gdbarch, m68k_register_virtual_type);
set_gdbarch_register_name (gdbarch, m68k_register_name);
set_gdbarch_register_size (gdbarch, 4);
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 5e9baac5f4a..e5b64344af3 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -1101,8 +1101,8 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* All registers are 32 bits */
set_gdbarch_register_size (gdbarch, MCORE_REG_SIZE);
- set_gdbarch_max_register_raw_size (gdbarch, MCORE_REG_SIZE);
- set_gdbarch_max_register_virtual_size (gdbarch, MCORE_REG_SIZE);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, MCORE_REG_SIZE);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, MCORE_REG_SIZE);
set_gdbarch_register_name (gdbarch, mcore_register_name);
set_gdbarch_register_virtual_type (gdbarch, mcore_register_virtual_type);
set_gdbarch_register_virtual_size (gdbarch, mcore_register_size);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 5df6205eec1..7ade6a224ce 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -5753,8 +5753,8 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_double_bit (gdbarch, 64);
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_register_raw_size (gdbarch, mips_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, 8);
- set_gdbarch_max_register_virtual_size (gdbarch, 8);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
tdep->found_abi = found_abi;
tdep->mips_abi = mips_abi;
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index ad80ad3f1ed..bcd96adea5a 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1146,10 +1146,10 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_register_size (gdbarch, 4);
set_gdbarch_register_bytes (gdbarch,
num_regs * gdbarch_register_size (gdbarch));
- set_gdbarch_max_register_raw_size (gdbarch, 4);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
set_gdbarch_register_raw_size (gdbarch, mn10300_register_raw_size);
set_gdbarch_register_byte (gdbarch, mn10300_register_byte);
- set_gdbarch_max_register_virtual_size (gdbarch, 4);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
set_gdbarch_register_virtual_size (gdbarch, mn10300_register_virtual_size);
set_gdbarch_register_virtual_type (gdbarch, mn10300_register_virtual_type);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mn10300_dwarf2_reg_to_regnum);
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 5cd78699b94..36ccadc5587 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -558,9 +558,9 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_size (gdbarch, NS32K_REGISTER_SIZE);
set_gdbarch_register_raw_size (gdbarch, ns32k_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, NS32K_MAX_REGISTER_RAW_SIZE);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, NS32K_MAX_REGISTER_RAW_SIZE);
set_gdbarch_register_virtual_size (gdbarch, ns32k_register_virtual_size);
- set_gdbarch_max_register_virtual_size (gdbarch,
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
NS32K_MAX_REGISTER_VIRTUAL_SIZE);
set_gdbarch_register_virtual_type (gdbarch, ns32k_register_virtual_type);
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 871af1f9851..3f2be7bc060 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -293,6 +293,24 @@ max_register_size (struct gdbarch *gdbarch)
}
int
+legacy_max_register_raw_size (void)
+{
+ if (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ())
+ return DEPRECATED_MAX_REGISTER_RAW_SIZE;
+ else
+ return max_register_size (current_gdbarch);
+}
+
+int
+legacy_max_register_virtual_size (void)
+{
+ if (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ())
+ return DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE;
+ else
+ return max_register_size (current_gdbarch);
+}
+
+int
register_size (struct gdbarch *gdbarch, int regnum)
{
struct regcache_descr *descr = regcache_descr (gdbarch);
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 5225c668573..ac335789465 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2871,9 +2871,9 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, off);
set_gdbarch_register_byte (gdbarch, rs6000_register_byte);
set_gdbarch_register_raw_size (gdbarch, rs6000_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, 16);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 16);
set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
- set_gdbarch_max_register_virtual_size (gdbarch, 16);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 16);
set_gdbarch_register_virtual_type (gdbarch, rs6000_register_virtual_type);
set_gdbarch_ptr_bit (gdbarch, wordsize * TARGET_CHAR_BIT);
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index da1c73ee0d1..9ad34c893e0 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1826,8 +1826,8 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Offset from address of function to start of its code.
Zero on most machines. */
set_gdbarch_function_start_offset (gdbarch, 0);
- set_gdbarch_max_register_raw_size (gdbarch, 8);
- set_gdbarch_max_register_virtual_size (gdbarch, 8);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
set_gdbarch_breakpoint_from_pc (gdbarch, s390_breakpoint_from_pc);
set_gdbarch_skip_prologue (gdbarch, s390_skip_prologue);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, s390_init_extra_frame_info);
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 0f8da62aaed..91f3f62964c 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -4359,8 +4359,8 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_fp0_regnum (gdbarch, -1);
set_gdbarch_num_pseudo_regs (gdbarch, 0);
- set_gdbarch_max_register_raw_size (gdbarch, 4);
- set_gdbarch_max_register_virtual_size (gdbarch, 4);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_num_regs (gdbarch, SH_DEFAULT_NUM_REGS);
@@ -4513,8 +4513,8 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_virtual_size (gdbarch, sh_sh4_register_raw_size);
set_gdbarch_register_byte (gdbarch, sh_sh4_register_byte);
set_gdbarch_num_pseudo_regs (gdbarch, 12);
- set_gdbarch_max_register_raw_size (gdbarch, 4 * 4);
- set_gdbarch_max_register_virtual_size (gdbarch, 4 * 4);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4 * 4);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4 * 4);
set_gdbarch_pseudo_register_read (gdbarch, sh_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, sh_pseudo_register_write);
tdep->FPUL_REGNUM = 23;
@@ -4601,12 +4601,12 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_virtual_size (gdbarch, sh_sh64_register_raw_size);
set_gdbarch_register_byte (gdbarch, sh_sh64_register_byte);
/* This seems awfully wrong!*/
- /*set_gdbarch_max_register_raw_size (gdbarch, 8);*/
+ /*set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);*/
/* should include the size of the pseudo regs. */
- set_gdbarch_max_register_raw_size (gdbarch, 4 * 4);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4 * 4);
/* Or should that go in the virtual_size? */
- /*set_gdbarch_max_register_virtual_size (gdbarch, 8);*/
- set_gdbarch_max_register_virtual_size (gdbarch, 4 * 4);
+ /*set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);*/
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4 * 4);
set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 5d39f389f2a..b22474aac93 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -3156,8 +3156,8 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_long_double_bit (gdbarch, 16 * TARGET_CHAR_BIT);
set_gdbarch_long_long_bit (gdbarch, 8 * TARGET_CHAR_BIT);
- set_gdbarch_max_register_raw_size (gdbarch, 8);
- set_gdbarch_max_register_virtual_size (gdbarch, 8);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
set_gdbarch_pop_frame (gdbarch, sparc_pop_frame);
set_gdbarch_push_return_address (gdbarch, sparc_push_return_address);
set_gdbarch_deprecated_push_dummy_frame (gdbarch, sparc_push_dummy_frame);
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 269c1652b65..0894a8f6b86 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1232,9 +1232,9 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, E_ALL_REGS_SIZE);
set_gdbarch_register_byte (gdbarch, v850_register_byte);
set_gdbarch_register_raw_size (gdbarch, v850_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, v850_reg_size);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, v850_reg_size);
set_gdbarch_register_virtual_size (gdbarch, v850_register_raw_size);
- set_gdbarch_max_register_virtual_size (gdbarch, v850_reg_size);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, v850_reg_size);
set_gdbarch_register_virtual_type (gdbarch, v850_reg_virtual_type);
set_gdbarch_read_fp (gdbarch, v850_target_read_fp);
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index ebc3d5a3d3e..ab968b69f1b 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -635,9 +635,9 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, VAX_REGISTER_BYTES);
set_gdbarch_register_byte (gdbarch, vax_register_byte);
set_gdbarch_register_raw_size (gdbarch, vax_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, VAX_MAX_REGISTER_RAW_SIZE);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, VAX_MAX_REGISTER_RAW_SIZE);
set_gdbarch_register_virtual_size (gdbarch, vax_register_virtual_size);
- set_gdbarch_max_register_virtual_size (gdbarch,
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
VAX_MAX_REGISTER_VIRTUAL_SIZE);
set_gdbarch_register_virtual_type (gdbarch, vax_register_virtual_type);
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index e572771b36a..2bbd4022d12 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -1045,9 +1045,9 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_bytes (gdbarch, E_ALL_REGS_SIZE);
set_gdbarch_register_byte (gdbarch, xstormy16_register_byte);
set_gdbarch_register_raw_size (gdbarch, xstormy16_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, xstormy16_pc_size);
+ set_gdbarch_deprecated_max_register_raw_size (gdbarch, xstormy16_pc_size);
set_gdbarch_register_virtual_size (gdbarch, xstormy16_register_raw_size);
- set_gdbarch_max_register_virtual_size (gdbarch, 4);
+ set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
set_gdbarch_register_virtual_type (gdbarch, xstormy16_reg_virtual_type);
/*