aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2018-02-21 11:20:03 +0000
committerYao Qi <yao.qi@linaro.org>2018-02-21 11:20:03 +0000
commitfc5b87361580d915e28ae5f3cc4794b75b671b5a (patch)
tree467350f5b0a6a236ec88f665f3eb8cfbe941f3fb /gdb/infrun.c
parent849d0ba802323fe05e3039ed5b22957db2c85a67 (diff)
downloadgdb-fc5b87361580d915e28ae5f3cc4794b75b671b5a.zip
gdb-fc5b87361580d915e28ae5f3cc4794b75b671b5a.tar.gz
gdb-fc5b87361580d915e28ae5f3cc4794b75b671b5a.tar.bz2
Remove regcache_save and regcache_cpy
... instead we start to use regcache methods save and restore. It is quite straightforward to replace regcache_save with regcache->save. regcache_cpy has some asserts, some of them not necessary, like gdb_assert (src != dst); because we already assert !m_readonly_p and src->m_readonly_p, so src isn't dst. Some of the asserts are moved to ::restore. gdb: 2018-02-21 Yao Qi <yao.qi@linaro.org> * frame.c (frame_save_as_regcache): Use regcache method save. (frame_pop): Use regcache method restore. * infrun.c (restore_infcall_suspend_state): Likewise. * linux-fork.c (fork_load_infrun_state): Likewise. * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method save. * regcache.c (regcache_save): Remove. (regcache::restore): More asserts. (regcache_cpy): Remove. * regcache.h (regcache_save): Remove the declaration. (regcache::restore): Move from private to public. Remove the friend declaration of regcache_cpy. (regcache_cpy): Remove declaration.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 1bc860b..b4e6c6b 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -8892,7 +8892,7 @@ restore_infcall_suspend_state (struct infcall_suspend_state *inf_state)
(and perhaps other times). */
if (target_has_execution)
/* NB: The register write goes through to the target. */
- regcache_cpy (regcache, inf_state->registers);
+ regcache->restore (inf_state->registers);
discard_infcall_suspend_state (inf_state);
}