This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 6/8] const-fy regcache::m_aspace
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, <gdb-patches at sourceware dot org>
- Date: Tue, 31 Oct 2017 10:19:17 -0400
- Subject: Re: [PATCH 6/8] const-fy regcache::m_aspace
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <1509096702-12202-1-git-send-email-yao.qi@linaro.org> <1509096702-12202-7-git-send-email-yao.qi@linaro.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 2017-10-27 05:31 AM, Yao Qi wrote:
> regcache::m_aspace is a const, never changed during the lifetime of
> regcache object.
I don't really understand what this patch tries to achieve. From the
description above, I thought you wanted to make the m_aspace field const,
not the pointed object.
If constifying the pointed address_space object is really what you meant to
do, I find having the const_cast more confusing than anything else. I think
we should constify all the way (removing const_casts, putting more consts
where needed) or not at all.
Simon