summaryrefslogtreecommitdiff
path: root/gdb/ppcobsd-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ppcobsd-tdep.c')
-rw-r--r--gdb/ppcobsd-tdep.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/ppcobsd-tdep.c b/gdb/ppcobsd-tdep.c
index 90381e4c412..49a8601409e 100644
--- a/gdb/ppcobsd-tdep.c
+++ b/gdb/ppcobsd-tdep.c
@@ -24,6 +24,7 @@
#include "osabi.h"
#include "regcache.h"
#include "regset.h"
+#include "gdb_assert.h"
#include "gdb_string.h"
@@ -46,6 +47,18 @@ 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);
}
@@ -60,6 +73,18 @@ 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);
}