This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch] Add PS_REGNUM.
> On Sat, Apr 06, 2002 at 03:25:46PM -0500, Andrew Cagney wrote:
>
>> Hello,
>>
>> This patch just fills in a gap in the current *_REGNUMs by adding
>> PS_REGNUM. Unlike the others. This one really does allow -1 as the
>> default value.
>>
>> (FP_REGNUM et.al. require real values as there is code around that,
>> unfortunatly, depends on there being a real FP register et.al. ulgh).
>>
>> committed,
>> Andrew
>
>
> What benefit does this have? PC_REGNUM I can understand. Even
> SP_REGNUM. But it's not like PS_REGNUM has any meaning to common
> code...
I think it is the other way round. PS_REGNUM is the only one being used
correctly - when >=0, std-regs.c (new file) maps $ps onto a
hardware/pseudo register. Cf the GDB manual.
On the other hand FP_REGNUM, PC_REGNUM and SP_REGNUM that are being used
``incorrectly''(1). They have no meaning outside of std-regs.c yet are
used throughout GDB.
enjoy,
Andrew
(1) I'm rewriting history here. There was a time when the FP_REGNUM was
both a hardware register and the frame-base.