]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Class reg_buffer
authorYao Qi <yao.qi@linaro.org>
Mon, 27 Nov 2017 13:06:12 +0000 (13:06 +0000)
committerYao Qi <yao.qi@linaro.org>
Mon, 22 Jan 2018 11:21:17 +0000 (11:21 +0000)
commit3052a9d87a3a5bf4e0778bad0574d0c8b51d293d
tree28da3a1e46e1d7d67dae34f60521a9422d5aabc2
parentec7a5fcbfd90b2f67f1a0e3f9866b11c5968ae61
Class reg_buffer

This patch adds a new class reg_buffer, and regcache inherits it.  Class
reg_buffer is a very simple class, which has the buffer for register
contents and status only.  It doesn't have any methods to set contents and
status, and it is expected that its children classes can inherit it and
add different access methods.

Another reason I keep class reg_buffer so simple is that I think
reg_buffer can be even reused in other classes which need to record the
registers contents and status, like frame cache for example.

gdb:

2017-11-27  Yao Qi  <yao.qi@linaro.org>

* regcache.c (regcache::regcache): Call reg_buffer ctor.
(regcache::arch): Move it to reg_buffer::arch.
(regcache::register_buffer): Likewise.
(regcache::assert_regnum): Likewise.
(regcache::num_raw_registers): Likewise.
* regcache.h (reg_buffer): New class.
(regcache): Inherit reg_buffer.
gdb/regcache.c
gdb/regcache.h