This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch] Add PS_REGNUM.
On Sun, Apr 07, 2002 at 02:54:02PM -0400, Andrew Cagney wrote:
> >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.
So what you're saying is that you added PS_REGNUM so that it could be
used as a standard $ps register name, not for the rest of GDB, right?
I don't really see the point; anyone who wants to look at the processor
status register presumably knows what some of the bits in it mean,
which is entirely architecture dependant. But caveat implementor :)
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer