Re: [WIP/RFC] MIPS registers overhaul

Kevin Buettner
2003-05-17T00:41:00Z

On May 16, 4:24pm, cgd@broadcom.com wrote:

> At Fri, 16 May 2003 23:06:50 +0000 (UTC), "Kevin Buettner" wrote:
> > On May 16, 3:50pm, cgd@broadcom.com wrote:
> >
> > > another reasonable way (but less efficient on a 64-bit part with a
> > > 64-bit FPU) would be:
> > >
> > > 0: <high half garbage><low half meaningful>
> > > 1: <high half garbage><low half meaningful>
> >
> > This is how the mips64 o32 rda transfers the FP registers.
>
> Hmm.
>
> OK, then, well, how do we ("gdb") tell the difference, since for o32
> binaries it's reasonable to use either o32 RDA or (one might think)
> n32 RDA?

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.

Another one (and it's a doozie) is that thread debugging won't work
due to the ABI specific libthread_db.so library that's dlopen'd by
RDA. A native GDB (assuming that we did the necessary work to port it
to mips64-linux) would have the same problem. We've kicked around
some ideas for fixing this problem in the past. The only idea that
I've found compelling is from Alex Oliva (and perhaps others) who
suggested that it may be best for a "native" gdb to spawn an
ABI-specific rda or gdbserver and connect to it automatically.

Kevin