diff options
Diffstat (limited to 'gdb/ppcnbsd-nat.c')
-rw-r--r-- | gdb/ppcnbsd-nat.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ppcnbsd-nat.c b/gdb/ppcnbsd-nat.c index 9b7a550406c..037b8d7d3be 100644 --- a/gdb/ppcnbsd-nat.c +++ b/gdb/ppcnbsd-nat.c @@ -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); |