summaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
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 /gdb/gdbarch.h
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.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h74
1 files changed, 62 insertions, 12 deletions
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