Simplify regcache_restore
authorYao Qi <yao.qi@linaro.org>
Fri, 21 Apr 2017 13:59:27 +0000 (14:59 +0100)
committerYao Qi <yao.qi@linaro.org>
Fri, 21 Apr 2017 13:59:27 +0000 (14:59 +0100)
commit4daf993d4d4686f2707810af3725038d2f289bbb
tree0497be2f60f13333a6707d01376af1c6ec4791bb
parent3ab87b688320e02db1bb7ed4bd45323d57737c77
Simplify regcache_restore

This patches removes the 2nd argument of regcache_restore, because it
is only called by regcache_cpy.  In regcache_cpy, if regcache_restore
is called, dst is not readonly, but src is readonly.  So this patch
adds an assert that src is readonly in regcache_restore.
regcache_cook_read read everything from a readonly regcache cache
(src)'s register_buffer, and register status is from ->register_status.

gdb:

2017-04-21  Yao Qi  <yao.qi@linaro.org>

* regcache.c (regcache_restore): Remove argument 2.  Replace
argument 3 with regcache.  Get register status from
src->register_status and get register contents from
register_buffer (src, regnum).
(regcache_cpy): Update.
gdb/ChangeLog
gdb/regcache.c
This page took 0.026877 seconds and 4 git commands to generate.