Add regcache raw_supply_integer and raw_collect_integer.
authorAlan Hayward <alan.hayward@arm.com>
Fri, 26 May 2017 16:04:13 +0000 (17:04 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Fri, 26 May 2017 16:07:52 +0000 (17:07 +0100)
commitb057297ab63a9124aae1773566815cd8c4bde8e9
tree73fedbfc92512c26f04333e433adefa2f2c0a907
parent22e7d2933103f1384c1d54dff6188cd57cbe171a
Add regcache raw_supply_integer and raw_collect_integer.

Use these to replace instances of MAX_REGISTER_SIZE.

* defs.h (copy_integer_to_size): New declaration.
* findvar.c (copy_integer_to_size): New function.
(do_cint_test): New selftest function.
(copy_integer_to_size_test): Likewise.
(_initialize_findvar): Likewise.
* mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
(mips_fbsd_collect_reg): Use raw_collect_integer.
* mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
(mips64_fill_gregset): Use raw_collect_integer
(mips64_fill_fpregset): Use raw_supply_integer.
* regcache.c (regcache::raw_supply_integer): New function.
(regcache::raw_collect_integer): Likewise.
* regcache.h: (regcache::raw_supply_integer): New declaration.
(regcache::raw_collect_integer): Likewise.
gdb/ChangeLog
gdb/defs.h
gdb/findvar.c
gdb/mips-fbsd-tdep.c
gdb/mips-linux-tdep.c
gdb/regcache.c
gdb/regcache.h