Re: [patch] mips-tdep: info registers

Aleksandar Ristovski
2009-03-06T05:00:46Z

oops... now I missed reply-to-all...

Daniel Jacobowitz wrote:
> On Thu, Mar 05, 2009 at 02:50:30PM -0800, Joel Brobecker wrote:
>>> They should be aliases for the normal registers, e.g. $1 and $at
>>> should mean the same thing.
>> I have never implemented something like this before. How would you
>> do it? I see that mips-tdep.c already has some table of register
>> name aliases. This doesn't look like it can be connected to
>> the "info registers" command, because of the way this command
>> is implemented (it iterates over all register numbers, gets their
>> associated names, and compares with the name used by the user).
>> As far as I can tell, the only way that I can see is by adding
>> a new series of pseudo-registers.
>
> Or change how info registers works, perhaps.
>

Maybe adding gdbarch_regname_to_regnum or something like
that (which would avoid iterating through the registers and
comparing returned register names).