aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppcobsd-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2006-05-15 21:53:20 +0000
committerMark Kettenis <kettenis@gnu.org>2006-05-15 21:53:20 +0000
commit8599da2d51649d4e39103345404d6eee11872929 (patch)
tree15a5fc2ada3930058fe8e6192551876ef0c88aa9 /gdb/ppcobsd-tdep.c
parentdc6641a55848bb8dfcb4d6dee66f63ca3d7977f4 (diff)
downloadgdb-8599da2d51649d4e39103345404d6eee11872929.zip
gdb-8599da2d51649d4e39103345404d6eee11872929.tar.gz
gdb-8599da2d51649d4e39103345404d6eee11872929.tar.bz2
* ppcobsd-nat.c: Include "gdb_assert.h".
[PT_GETFPREGS] (getfpregs_supplies): New function. (ppcobsd_fetch_registers, ppcobsd_fetch_registers): Hanlde OS versions that have PT_GETFPREGS. (_initialize_ppcobsd_nat) [PT_GETFPREGS]: Initialize ppcobsd_fpreg_offsets. * ppcobsd-tdep.h (ppcobsd_fpreg_offsets, ppcobsd_fpregset): Declare. * ppcobsd-tdep.c (ppcobsd_fpreg_offsets, ppcobsd_fpregset): New variables. (_initialize_ppcobsd_tdep): Initialize ppcobsd_fpreg_offsets. * Makefile.in (ppcobsd-nat.o): Update dependencies.
Diffstat (limited to 'gdb/ppcobsd-tdep.c')
-rw-r--r--gdb/ppcobsd-tdep.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/ppcobsd-tdep.c b/gdb/ppcobsd-tdep.c
index 4b752b8..b4bc419 100644
--- a/gdb/ppcobsd-tdep.c
+++ b/gdb/ppcobsd-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for OpenBSD/powerpc.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GDB.
@@ -39,6 +39,7 @@
/* Register offsets from <machine/reg.h>. */
struct ppc_reg_offsets ppcobsd_reg_offsets;
+struct ppc_reg_offsets ppcobsd_fpreg_offsets;
/* Core file support. */
@@ -102,6 +103,12 @@ struct regset ppcobsd_gregset =
ppcobsd_supply_gregset
};
+struct regset ppcobsd_fpregset =
+{
+ &ppcobsd_fpreg_offsets,
+ ppc_supply_fpregset
+};
+
/* Return the appropriate register set for the core section identified
by SECT_NAME and SECT_SIZE. */
@@ -341,4 +348,11 @@ _initialize_ppcobsd_tdep (void)
ppcobsd_reg_offsets.vscr_offset = 512;
ppcobsd_reg_offsets.vrsave_offset = 520;
}
+
+ if (ppcobsd_fpreg_offsets.fpscr_offset == 0)
+ {
+ /* Floating-point registers. */
+ ppcobsd_reg_offsets.f0_offset = 0;
+ ppcobsd_reg_offsets.fpscr_offset = 256;
+ }
}