aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-fbsd-nat.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-08-29 15:04:09 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2017-08-29 15:04:09 -0700
commit7755ddb77d227d1d5c1b211e989fafb17e26765d (patch)
tree7e4ce4202951f66150b9afa58d68d777e6cf93a3 /gdb/mips-fbsd-nat.c
parent5f0f0847e23a57d4e95c2c639e803e6f51914efc (diff)
downloadgdb-7755ddb77d227d1d5c1b211e989fafb17e26765d.zip
gdb-7755ddb77d227d1d5c1b211e989fafb17e26765d.tar.gz
gdb-7755ddb77d227d1d5c1b211e989fafb17e26765d.tar.bz2
Look for FIR in the last FreeBSD/mips floating-point register.
FreeBSD/mips kernels were recently changed to include the floating point implementation revision register in the floating point register set exported in process cores and via ptrace() (r318067). This change will first ship in FreeBSD 12.0 when it is eventually released. The space used to hold FIR was previously reserved in 'struct fpreg' as a zero-filled dummy for padding, so 'struct fpreg' has not changed in size. Since FIR should be non-zero on all MIPS processors supported by FreeBSD, ignore a value of 0 from 'struct fpreg' and only report non-zero values as a valid FIR register. gdb/ChangeLog: * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR. * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR out of loop and add supply of FIR. (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and add collect of FIR.
Diffstat (limited to 'gdb/mips-fbsd-nat.c')
-rw-r--r--gdb/mips-fbsd-nat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/mips-fbsd-nat.c b/gdb/mips-fbsd-nat.c
index 53817d7..c381186 100644
--- a/gdb/mips-fbsd-nat.c
+++ b/gdb/mips-fbsd-nat.c
@@ -46,7 +46,7 @@ static bool
getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
{
return (regnum >= mips_regnum (gdbarch)->fp0
- && regnum < mips_regnum (gdbarch)->fp_implementation_revision);
+ && regnum <= mips_regnum (gdbarch)->fp_implementation_revision);
}
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this