This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/8] Remove regcache_descr::nr_raw_registers
- 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:27:25 -0400
- Subject: Re: [PATCH 4/8] Remove regcache_descr::nr_raw_registers
- 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-5-git-send-email-yao.qi@linaro.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 2017-10-27 05:31 AM, Yao Qi wrote:
> struct regcache_descr has fields nr_raw_registers and gdbarch, and
> nr_raw_registers can be got via gdbarch_num_regs (gdbarch), so it looks
> nr_raw_registers is redundant. This patch removes it.
I would suggest adding a num_regs method to regcache to wrap the call to
gdbarch_num_regs, so that if we need to change that call, we have only one
place to change. Otherwise, LGTM.
Simon