diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-04-22 21:13:06 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-04-22 21:13:06 +0000 |
commit | d195bc9fb02794ac453fecd27c8ce8606ed37e49 (patch) | |
tree | 3699d59fdad8461973107d8d71166e6a53db3d2e /gdb/ppc-tdep.h | |
parent | 5c98409bd6064e84adfbfaded8484f8215843253 (diff) | |
download | gdb-d195bc9fb02794ac453fecd27c8ce8606ed37e49.zip gdb-d195bc9fb02794ac453fecd27c8ce8606ed37e49.tar.gz gdb-d195bc9fb02794ac453fecd27c8ce8606ed37e49.tar.bz2 |
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.h | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h index d570f79..7046553 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 |