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 2/2] Implement gdbarch hook user_register_name on ARM


Yao Qi wrote:
> On 12/23/2010 06:02 AM, Ulrich Weigand wrote:
> > Huh, I didn't even see this, I was refering to this line:
> >   { "fp", 11 },
> > in arm_register_aliases.  As long as this line is there, changes to
> > set_gdbarch_deprecated_fp_regnum probably don't matter as this isn't
> > even evaluated, since "fp" is just treated as a user register instead
> > of a standard register.
> > 
> Ulrich,
> changes to set_gdbarch_deprecated_fp_regnum matters here.
> 
> There are two "fp", "pc" and "sp" in user registers.  The first one is
> added from builtin_user_regs (fp, pc, sp, ps) in user_regs_init, and the
> second one is added from `arm_register_aliases' in our case.  The first
> one is always used, so these three in arm_register_aliases are redundant.

I see.  I had thought the calls in arm_register_aliases would override the
standard registers, but it looks like you're right, they don't.

>   { "fp", 11 },
>   { "sp", 13 },
>   { "pc", 15 },
> 
> How about this patch to remove them?

If they don't actually take effect, I agree it is better to remove them.
However, I'd prefer to see some comment in the code explaining why these
names are not (and should not be) added as aliases ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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