This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 00/15] Remove regcache::m_readonly_p
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Mon, 22 Jan 2018 14:58:19 +0000
- Subject: Re: [RFC 00/15] Remove regcache::m_readonly_p
- Authentication-results: sourceware.org; auth=none
- References: <1512125286-29788-1-git-send-email-yao.qi@linaro.org> <86fu75g4l5.fsf@gmail.com> <ace5c329-4f89-f7f8-e8c2-24e097857bb1@ericsson.com>
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 (齐尧)