* ppc-tdep.h (struct gdbarch_tdep): Change definition of
[deliverable/binutils-gdb.git] / gdb / ppcnbsd-nat.c
index 9b7a550406c14e53f72c21f3a3f9d13f664a5a1d..037b8d7d3bea8832594922856038960c7c7b8bbb 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "defs.h"
 #include "inferior.h"
+#include "gdb_assert.h"
 
 #include "ppc-tdep.h"
 #include "ppcnbsd-tdep.h"
@@ -49,6 +50,18 @@ getfpregs_supplies (int regno)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
 
+  /* 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 NetBSD/E500
+     combination to the problem.  */
+  gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
+
   return ((regno >= tdep->ppc_fp0_regnum
            && regno < tdep->ppc_fp0_regnum + ppc_num_fprs)
          || regno == tdep->ppc_fpscr_regnum);
This page took 0.033242 seconds and 4 git commands to generate.