This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 10/15] Class regcache_readonly
- 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: Wed, 24 Jan 2018 17:37:15 +0000
- Subject: Re: [PATCH 10/15] Class regcache_readonly
- Authentication-results: sourceware.org; auth=none
- References: <1512125286-29788-1-git-send-email-yao.qi@linaro.org> <1512125286-29788-11-git-send-email-yao.qi@linaro.org> <a853a3d5-d184-0115-9a3f-078b870b0d79@ericsson.com> <CAH=s-PNH6sXVTfZX55hWDb-a7zAtAyY-aP0auaKaaY7rrQ=5Lw@mail.gmail.com> <ebe32208-5390-3218-3722-2282054035ae@ericsson.com>
On Wed, Jan 24, 2018 at 4:57 PM, Simon Marchi <simon.marchi@ericsson.com> wrote:
>
> Just pitching some ideas, I don't think I understand the situation as well as
> you do.
>
> I assume we want to keep the "regcache" type to mean read/write and attached,
> since that's the most common use case. Keeping this will reduce the amount of
> changes needed throughout the code base. We can then qualify the other types
Yes.
> based on how they differ from "read/write" and "attached". That would give us
> (in the same order as your list above):
>
> - readonly_detached_regcache
> - detached_regcache
> - regcache
> - readonly_regcache
This should be readonly_attached_regcache.
>
> This would give a predictable naming, and makes it maybe easier to know what
> to expect from each type. The graph you used in message 0/15 would become:
>
> reg_buffer
> ^
> |
> ------+-----
> ^
> |
> readable_regcache (abstract)
> ^
> |
> ------+------
> ^ ^
> | |
> detached_regcache readonly_detached_regcache
> ^
> |
> regcache
>
This naming is fine to me except for readonly_detached_regcache
as it is too long. As "readonly" implies "detached" in current context,
can we name it readonly_regcache?
--
Yao (齐尧)