Re: [RFC 00/15] Remove regcache::m_readonly_p

Yao Qi
2018-01-22T14:58:24Z

On Thu, Jan 18, 2018 at 4:56 PM, Simon Marchi <simon.marchi@ericsson.com> wrote:
>
> Which of these types will have actual instances of them, and which ones
> are only interfaces?
>

reg_buffer_rw, regcache_readonly and regcache have instances.
regcache_read is abstract. reg_buffer is not abstract, but it has no
instances.

> I have some problem understanding the difference between regcache_read
> and regcache_readonly. I think the fact that the name is so similar
> doesn't help. Would there be a better name for regcache_readonly?

regcache_readonly is a type used when the instance of regcache is
readonly. regcache_readonly extends regcache_read, and implement
virtual function raw_update doing nothing. regcache_read is an abstract
class, in which raw_update is a pure virtual function. It only has methods
to do the read.

I pushed them to branch users/qiyao/regcache-split-4-1 I also generate
doxygen doc
http://people.linaro.org/~yao.qi/gdb/doxy/regcache-split-4/doxy/gdb-xref/classreg__buffer.html

I am open to the naming.

--
Yao (齐尧)