Avoid memcpys in regcache read_part/write_part for full registers.
authorAlan Hayward <alan.hayward@arm.com>
Wed, 20 Jun 2018 08:31:37 +0000 (09:31 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Thu, 21 Jun 2018 15:27:15 +0000 (16:27 +0100)
commit33bab475a6984afedac8a036b3bb40b5555b4127
tree90001a8f3d2240a6bb406e5d9916e4475c70d35a
parentd388f64333fb977c1b975cb9d26c762b143f4cb9
Avoid memcpys in regcache read_part/write_part for full registers.

Additionally, tidy up the functions: Remove asserts, use gdb_byte,
update comments.

gdb/
* regcache.c (readable_regcache::read_part): Avoid memcpy when
possible.
(regcache::write_part): Likewise.
(readable_regcache::cooked_read_part): Update comment.
(readable_regcache::cooked_write_part): Likewise.
* regcache.h: (readable_regcache::read_part): Likewise.
(regcache::write_part): Likewise.
gdb/ChangeLog
gdb/regcache.c
gdb/regcache.h