Re: [WIP/RFC] MIPS registers overhaul

Daniel Jacobowitz
2003-05-21T15:41:43Z

On Wed, May 21, 2003 at 11:34:39AM -0400, Andrew Cagney wrote:
> >At Tue, 20 May 2003 16:52:23 -0400, Andrew Cagney wrote:
> >
> >>> At Sat, 17 May 2003 00:41:10 +0000 (UTC), "Kevin Buettner" wrote:
> >>>
> >
> >>>> Unfortunately, it isn't reasonable to use an ABI-specific RDA to debug
> >>>> an application which uses a different ABI. It might kind of, sort of
> >>>> work some of the time, but there are various things that won't work.
> >>>> You've just identified one of the problems.
> >
> >>>
> >>>
> >>> BTW, because of this kind of problem, does it even make sense that
> >>> when talking to a mips64 kernel but using an o32 rda (or gdbserver
> >>> 8-), you'd use a "mips64" protocol? I.e., why wouldn't it just use
> >>> the 32-bit mips protocol, since from you're debugging a 32-bit binary
> >>> with a 32-bit debugging daemon...
> >
> >>
> >>Ignoring the FP registers, I think it does make sense. o32 code does
> >>run on a 64 bit ISA. Who is GDB to decide what the ISA should be.
>
> That came out wrong.
>
> I think a GDB debugging a remote 64 bit MIPS ISA should always expect 64
> bit GPRs and 64 bit FPRs when the ISA is 64 bits, regardless of the ABI.
>
> It is quite legitimate, for instance, for GDB to do something as sick-o
> as clearing the FR bit and then resume the thread. The register
> save/restore code needs to correctly handle this - be it reject the
> operation or ``do the right thing''.

But when using rda or gdbserver to debug an o32 application, then for
all intents and purposes we are debugging a 32-bit ISA. The kernel
will not allow us to change the FR bit. The app will never see 64-bit
registers. The 32-bit protocol makes more sense here IMO.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer