This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/8] Remove regcache_descr::nr_raw_registers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]