aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-12-04 04:01:16 +0000
committerAndrew Cagney <cagney@redhat.com>2000-12-04 04:01:16 +0000
commit88c72b7d7171d9f162ed9ecca26cf1d45abc38ee (patch)
tree1c26ec8f099591f20accc499889b50d37e516629 /gdb/gdbarch.h
parent76440e4ba0ba69ee333c0cfb8e630c68205a80c6 (diff)
downloadgdb-88c72b7d7171d9f162ed9ecca26cf1d45abc38ee.zip
gdb-88c72b7d7171d9f162ed9ecca26cf1d45abc38ee.tar.gz
gdb-88c72b7d7171d9f162ed9ecca26cf1d45abc38ee.tar.bz2
Multiarch STAB_REG_TO_REGNUM, ECOFF_REG_TO_REGNUM,
DWARF_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 198d800..307bc5f 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -428,6 +428,86 @@ extern void set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch, int nnpc_regnum);
#endif
#endif
+/* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (STAB_REG_TO_REGNUM)
+#define STAB_REG_TO_REGNUM(stab_regnr) (no_op_reg_to_regnum (stab_regnr))
+#endif
+
+typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr);
+extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr);
+extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum);
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STAB_REG_TO_REGNUM)
+#define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
+#endif
+#endif
+
+/* Provide a default mapping from a ecoff register number to a gdb REGNUM. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (ECOFF_REG_TO_REGNUM)
+#define ECOFF_REG_TO_REGNUM(ecoff_regnr) (no_op_reg_to_regnum (ecoff_regnr))
+#endif
+
+typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr);
+extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr);
+extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum);
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ECOFF_REG_TO_REGNUM)
+#define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
+#endif
+#endif
+
+/* Provide a default mapping from a DWARF register number to a gdb REGNUM. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DWARF_REG_TO_REGNUM)
+#define DWARF_REG_TO_REGNUM(dwarf_regnr) (no_op_reg_to_regnum (dwarf_regnr))
+#endif
+
+typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr);
+extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr);
+extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum);
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF_REG_TO_REGNUM)
+#define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
+#endif
+#endif
+
+/* Convert from an sdb register number to an internal gdb register number.
+ This should be defined in tm.h, if REGISTER_NAMES is not set up
+ to map one to one onto the sdb register numbers. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (SDB_REG_TO_REGNUM)
+#define SDB_REG_TO_REGNUM(sdb_regnr) (no_op_reg_to_regnum (sdb_regnr))
+#endif
+
+typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr);
+extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr);
+extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum);
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SDB_REG_TO_REGNUM)
+#define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
+#endif
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM)
+#define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (no_op_reg_to_regnum (dwarf2_regnr))
+#endif
+
+typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr);
+extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr);
+extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum);
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_REG_TO_REGNUM)
+#define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
+#endif
+#endif
+
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME)
#define REGISTER_NAME(regnr) (legacy_register_name (regnr))