Cleanups to FreeBSD/mips native register operations.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 18 Apr 2017 17:49:44 +0000 (10:49 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 23 May 2017 19:02:35 +0000 (12:02 -0700)
commitd489d81d0934c4fda8c8aa68fbec1b1315cf8df0
tree6713fd5ddb5c94562c0a67627efd6847fde06275
parent6e92fed5946111a76064feb8a2a184d224deae1a
Cleanups to FreeBSD/mips native register operations.

Compare against the "raw" PC register number instead of the cooked
register number when determining if a register was handled by
PT_GETREGS.  Previously the register fetch/store operations only tried
PT_GETREGS to fetch any individual register.  The result was that
fetching or storing an individual register not covered by PT_GETREGS
(such as floating point registers) did not work.

While here, remove an early exit to simplify the code flow from the
PT_GETREGS / PT_SETREGS case, and add a getfpregs_supplies similar to
getregs_supplies to describe the registers supplied by PT_GETFPREGS
and PT_SETFPREGS.

gdb/ChangeLog:

* mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
(getpfpregs_supplies): New function.
(mips_fbsd_fetch_inferior_registers): Remove early exit and use
getfpregs_supplies.
(mips_fbsd_store_inferior_registers): Likewise.
gdb/ChangeLog
gdb/mips-fbsd-nat.c