diff options
Diffstat (limited to 'gdb/ppcnbsd-tdep.c')
-rw-r--r-- | gdb/ppcnbsd-tdep.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c index 891b74fc..c1d4146 100644 --- a/gdb/ppcnbsd-tdep.c +++ b/gdb/ppcnbsd-tdep.c @@ -111,6 +111,14 @@ ppcnbsd_supply_fpreg (char *fpregs, int regno) struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int i; + /* FIXME: jimb/2004-05-05: Some PPC variants don't have + floating-point registers. For such variants, + tdep->ppc_fp0_regnum and tdep->ppc_fpscr_regnum will be -1. I + don't think NetBSD runs on any of those chips, but we can at + least make sure that if someone tries it, they'll get a proper + notification. */ + gdb_assert (ppc_floating_point_unit_p (current_gdbarch)); + for (i = 0; i < ppc_num_fprs; i++) { if (regno == tdep->ppc_fp0_regnum + i || regno == -1) @@ -128,6 +136,14 @@ ppcnbsd_fill_fpreg (char *fpregs, int regno) struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int i; + /* FIXME: jimb/2004-05-05: Some PPC variants don't have + floating-point registers. For such variants, + tdep->ppc_fp0_regnum and tdep->ppc_fpscr_regnum will be -1. I + don't think NetBSD runs on any of those chips, but we can at + least make sure that if someone tries it, they'll get a proper + notification. */ + gdb_assert (ppc_floating_point_unit_p (current_gdbarch)); + for (i = 0; i < ppc_num_fprs; i++) { if (regno == tdep->ppc_fp0_regnum + i || regno == -1) |