]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/mips-fbsd-tdep.c
Look for FIR in the last FreeBSD/mips floating-point register.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 29 Aug 2017 22:04:09 +0000 (15:04 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 29 Aug 2017 22:04:09 +0000 (15:04 -0700)
commit7755ddb77d227d1d5c1b211e989fafb17e26765d
tree7e4ce4202951f66150b9afa58d68d777e6cf93a3
parent5f0f0847e23a57d4e95c2c639e803e6f51914efc
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.
gdb/ChangeLog
gdb/mips-fbsd-nat.c
gdb/mips-fbsd-tdep.c