Add current_regcache unit test
authorYao Qi <yao.qi@linaro.org>
Tue, 9 May 2017 11:36:53 +0000 (12:36 +0100)
committerYao Qi <yao.qi@linaro.org>
Tue, 9 May 2017 11:36:53 +0000 (12:36 +0100)
commit8248946cc5fd4522de630b9d86627af6e8fe0097
tree4b3a95b65ad79c7201c1fc636106dacbcbdf659c
parente645cf40b111daef4518a58547de577eb9379ccb
Add current_regcache unit test

This patch adds a unit test to current_regcache, to make sure it is
correctly updated by get_thread_arch_aspace_regcache and
registers_changed_ptid.

gdb:

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

* regcache.c [GDB_SELF_TEST]: Include selftest.h.
(current_regcache_size): New function.
(current_regcache_test): New function.
(_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
gdb/ChangeLog
gdb/regcache.c