Re: [WIP/RFC] MIPS registers overhaul

Daniel Jacobowitz
2003-05-17T20:59:58Z

On Fri, May 16, 2003 at 05:40:52PM -0700, Kevin Buettner wrote:
> 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.

TBH, I'd rather like to see us develop an extended and more extensible
remote protocol (on any number of people's TODO lists already!) and do
_all_ native debugging this way.

I don't think it's a pipe dream but it's definitely a future dream.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer