summaryrefslogtreecommitdiff
path: root/gdb/ppc-tdep.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-04-22 21:13:06 +0000
committerMark Kettenis <kettenis@gnu.org>2004-04-22 21:13:06 +0000
commit5960a15c2709b277e94c615b20ab3e5bb4939bd3 (patch)
tree49946af14903a066fcd060c218beb9144cb00c94 /gdb/ppc-tdep.h
parentcafe714574daf49a9cd152afc55783728412a3e6 (diff)
downloadgdb-5960a15c2709b277e94c615b20ab3e5bb4939bd3.tar.gz
Add OpenBSD/powerpc support.
* NEWS (New native configurations): Mention OpenBSD/powerpc. * ppc-tdep.h (struct ppc_reg_offsets): New structure. (ppc_supply_gregset, ppc_supply_fpregset, ppc_collect_gregset) (ppc_collect_fpregset): New prototypes. * ppcobsd-nat.c: New file. * ppcobsd-tdep.c: New file. * ppcobsd-tdep.h: New file. * rs6000-tdep.c: Include "regset.h". (ppc_supply_reg, ppc_collect_reg, ppc_supply_gregset) (ppc_supply_fpregset, ppc_collect_gregset, ppc_collect_fpregset): New functions. * Makefile.in (ALLDEPFILES): Add pccobsd-nat.c and ppcobsd-tdep.c. (ppcobsd-nat.o, ppcobsd-tdep.o): New dependencies. (rs6000-tdep.o): Update dependencies. * configure.host: Add powerpc-*-openbsd. * configure.tgt: Add powerpc-*-openbsd. * config/powerpc/obsd.mh: New file. * config/powerpc/nm-obsd.h: New file. * config/powerpc/obsd.mt: New file.
Diffstat (limited to 'gdb/ppc-tdep.h')
-rw-r--r--gdb/ppc-tdep.h59
1 files changed, 58 insertions, 1 deletions
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h
index d570f798522..70465530452 100644
--- a/gdb/ppc-tdep.h
+++ b/gdb/ppc-tdep.h
@@ -74,11 +74,68 @@ enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarc
/* From rs6000-tdep.c... */
int altivec_register_p (int regno);
-
/* Return non-zero when the architecture has an FPU (or at least when
the ABI is using the FPU). */
int ppc_floating_point_unit_p (struct gdbarch *gdbarch);
+/* Register set description. */
+
+struct ppc_reg_offsets
+{
+ /* General-purpose registers. */
+ int r0_offset;
+ int pc_offset;
+ int ps_offset;
+ int cr_offset;
+ int lr_offset;
+ int ctr_offset;
+ int xer_offset;
+ int mq_offset;
+
+ /* Floating-point registers. */
+ int f0_offset;
+ int fpscr_offset;
+
+ /* AltiVec registers. */
+ int vr0_offset;
+ int vscr_offset;
+ int vrsave_offset;
+};
+
+/* Supply register REGNUM in the general-purpose register set REGSET
+ from the buffer specified by GREGS and LEN to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+extern void ppc_supply_gregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *gregs, size_t len);
+
+/* Supply register REGNUM in the floating-point register set REGSET
+ from the buffer specified by FPREGS and LEN to register cache
+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
+
+extern void ppc_supply_fpregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *fpregs, size_t len);
+
+/* Collect register REGNUM in the general-purpose register set
+ REGSET. from register cache REGCACHE into the buffer specified by
+ GREGS and LEN. If REGNUM is -1, do this for all registers in
+ REGSET. */
+
+extern void ppc_collect_gregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *gregs, size_t len);
+
+/* Collect register REGNUM in the floating-point register set
+ REGSET. from register cache REGCACHE into the buffer specified by
+ FPREGS and LEN. If REGNUM is -1, do this for all registers in
+ REGSET. */
+
+extern void ppc_collect_fpregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *fpregs, size_t len);
+
/* Private data that this module attaches to struct gdbarch. */
struct gdbarch_tdep