summaryrefslogtreecommitdiff
path: root/gdb/ppcobsd-tdep.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2007-08-30 13:13:59 +0000
committerAlan Modra <amodra@bigpond.net.au>2007-08-30 13:13:59 +0000
commit2dc5e5bea52f2ffe54966b2cb1e0bc5c872ec411 (patch)
tree3fda4aef8d286af9a50dc8054efbf2c9fd5bf69e /gdb/ppcobsd-tdep.c
parent4f7ad0a36938559637d48a61ba1970c914880bed (diff)
downloadgdb-2dc5e5bea52f2ffe54966b2cb1e0bc5c872ec411.tar.gz
* ppc-linux-nat.c (right_fill_reg): Delete.
(supply_gregset): Use ppc_supply_gregset. (supply_fpregset): Use ppc_supply_fpregset. (fill_gregset): Use ppc_collect_gregset. (fill_fpregset): Use ppc_collect_fpregset. * ppc-linux-tdep.c (PPC_LINUX_PT_*): Don't define. (right_supply_register, ppc_linux_supply_gregset): Delete. (ppc32_linux_supply_gregset, ppc64_linux_supply_gregset): Delete. (ppc_linux_supply_fpregset): Delete. (ppc_linux_collect_gregset): New function. (ppc32_linux_reg_offsets, ppc64_linux_reg_offsets): New. (ppc32_linux_gregset, ppc64_linux_gregset): Update to use reg offsets, ppc_linux_supply_gregset, and ppc_collect_gregset. (ppc_linux_fpregset): Rename to ppc32_linux_fpregset and update. (ppc_linux_gregset, ppc_linux_fpregset): New functions. (ppc_linux_regset_from_core_section): Update. * ppc-tdep.h (ppc_linux_gregset, ppc_linux_fpregset): Declare. (ppc_linux_supply_gregset, ppc_linux_supply_fpregset): Delete. (struct ppc_reg_offsets): Add gpr_size, xr_size, fpscr_size fields. * ppcobsd-tdep.c (ppcobsd_supply_gregset): Delete FIXME and assert. (ppcobsd_collect_gregset): Likewise. (_initialize_ppcnbsd_tdep): Init gpr_size, xr_size, fpscr_size. * ppcnbsd-tdep.c (_initialize_ppcobsd_tdep): Likewise. * ppcobsd-nat.c (_initialize_ppcobsd_nat): Likewise. * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Likewise. (rs6000_aix64_reg_offsets): Likewise. (rs6000_aix_supply_regset): Call ppc_supply_fpregset without testing ppc_floating_point_unit_p. (rs6000_aix_collect_regset): Similarly. * rs6000-tdep.c (ppc_supply_reg): Add regsize param. Adjust offset when regsize is larger than regcache register size. (ppc_collect_reg): Similarly zero pad when regsize is larger than regcache register size. (ppc_greg_offset): New function, split out from.. (ppc_supply_gregset): ..here. Separate code handling all regs from single reg case. Correct xer offset. (ppc_fpreg_offset): New function, split out from.. (ppc_supply_fpregset): ..here. Separate code handling all regs from single reg case. (ppc_collect_gregset, ppc_collect_fpregset): Likewise. (ppc_supply_fpregset, ppc_collect_fpregset): Don't assert we have a fp unit, instead return if no fp.
Diffstat (limited to 'gdb/ppcobsd-tdep.c')
-rw-r--r--gdb/ppcobsd-tdep.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/gdb/ppcobsd-tdep.c b/gdb/ppcobsd-tdep.c
index c26c5d12c43..dac9e7bb24e 100644
--- a/gdb/ppcobsd-tdep.c
+++ b/gdb/ppcobsd-tdep.c
@@ -51,18 +51,6 @@ ppcobsd_supply_gregset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *gregs, size_t len)
{
- /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
- point registers. Traditionally, GDB's register set has still
- listed the floating point registers for such machines, so this
- code is harmless. However, the new E500 port actually omits the
- floating point registers entirely from the register set --- they
- don't even have register numbers assigned to them.
-
- It's not clear to me how best to update this code, so this assert
- will alert the first person to encounter the OpenBSD/E500
- combination to the problem. */
- gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
-
ppc_supply_gregset (regset, regcache, regnum, gregs, len);
ppc_supply_fpregset (regset, regcache, regnum, gregs, len);
}
@@ -77,18 +65,6 @@ ppcobsd_collect_gregset (const struct regset *regset,
const struct regcache *regcache, int regnum,
void *gregs, size_t len)
{
- /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
- point registers. Traditionally, GDB's register set has still
- listed the floating point registers for such machines, so this
- code is harmless. However, the new E500 port actually omits the
- floating point registers entirely from the register set --- they
- don't even have register numbers assigned to them.
-
- It's not clear to me how best to update this code, so this assert
- will alert the first person to encounter the OpenBSD/E500
- combination to the problem. */
- gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
-
ppc_collect_gregset (regset, regcache, regnum, gregs, len);
ppc_collect_fpregset (regset, regcache, regnum, gregs, len);
}
@@ -331,6 +307,8 @@ _initialize_ppcobsd_tdep (void)
{
/* General-purpose registers. */
ppcobsd_reg_offsets.r0_offset = 0;
+ ppcobsd_reg_offsets.gpr_size = 4;
+ ppcobsd_reg_offsets.xr_size = 4;
ppcobsd_reg_offsets.pc_offset = 384;
ppcobsd_reg_offsets.ps_offset = 388;
ppcobsd_reg_offsets.cr_offset = 392;
@@ -354,5 +332,6 @@ _initialize_ppcobsd_tdep (void)
/* Floating-point registers. */
ppcobsd_reg_offsets.f0_offset = 0;
ppcobsd_reg_offsets.fpscr_offset = 256;
+ ppcobsd_reg_offsets.fpscr_size = 4;
}
}