Move current_regcache to regcache::current_regcache
authorYao Qi <yao.qi@linaro.org>
Wed, 24 May 2017 21:15:23 +0000 (22:15 +0100)
committerYao Qi <yao.qi@linaro.org>
Wed, 24 May 2017 21:15:23 +0000 (22:15 +0100)
commite521e87e8514b9d3497208b70bcd067f132c58ed
tree471784e5e4d6ed9539dc3eaa8ca424103ec930e2
parentd8e07dda92366be0f6fc2e7128620d3dd53494e3
Move current_regcache to regcache::current_regcache

This patches moves global variable current_regcache to a class regcache
static variable (protected) so that the unit test I add in the following
patch can access it (by means of extending class regcache in unit test).

gdb:

2017-05-24  Yao Qi  <yao.qi@linaro.org>

* regcache.c (current_regcache): Change it to
regcache::current_regcache.
(regcache_observer_target_changed): Update.
(regcache_thread_ptid_changed): Make it a regcache static
method.
(regcache_thread_ptid_changed): Update.
(class regcache_access): New.
(current_regcache_test): Update.
(_initialize_regcache): Update.
* regcache.h: Include forward_list.
(regcache): Declare regcache_thread_ptid_changed and declare
registers_changed_ptid as friend.
gdb/ChangeLog
gdb/regcache.c
gdb/regcache.h
This page took 0.025715 seconds and 4 git commands to generate.