merge from gcc
[deliverable/binutils-gdb.git] / gdb / ppcobsd-tdep.c
index 90381e4c412bb98264c3164cc5fc8f9c7f9605b4..4266bf15904cf053319648efde62a1b6f8d112a0 100644 (file)
@@ -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);
 }
@@ -90,8 +115,6 @@ static void
 ppcobsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   /* OpenBSD uses SVR4-style shared libraries.  */
-  set_gdbarch_in_solib_call_trampoline
-    (gdbarch, generic_in_solib_call_trampoline);
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_ilp32_fetch_link_map_offsets);
 
This page took 0.023838 seconds and 4 git commands to generate.