This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: m68k structure return register
- From: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Vladimir Prus <vladimir at codesourcery dot com>, gdb at sources dot redhat dot com, Chris Johns <chrisj at rtems dot org>
- Date: Thu, 20 Sep 2007 07:57:39 +0200
- Subject: Re: m68k structure return register
- References: <200706201325.07067.vladimir@codesourcery.com> <200709191224.28030.vladimir@codesourcery.com> <20070919133136.GA29941@caradoc.them.org>
On Wed, 2007-09-19 at 09:31 -0400, Daniel Jacobowitz wrote:
> On Wed, Sep 19, 2007 at 12:24:27PM +0400, Vladimir Prus wrote:
> > > Group I -- monitor.mt -- just m68k-tdep.c
> > >
> > > 1. m68k-*-aout* a1
> > > 2. m68k-*-coff* a1
> > > 3. m68k-*-elf* a0
> > > 6. m68k-*-uclinuxoldabi* a0
> > > 7. m68k-*-uclinux* a1
> > > 9. m68k-*-rtems* a0
> > >
> > > In gdb, all target here use the register set in m68k_gdbarch_init --
> > > currently A1, which register is wrong for half of targets. I'll get to this
> > > group shortly.
>
> Which of these are ELF? I know RTEMS is;
Correct.
> > > The problem is therefore, group I. Notably, for m68k-elf gcc uses
> > > a0, whereas gdb assumes a1. And for m68k-elf, we cannot set
> > > any osabi sniffer. I think that nowdays m68k-elf is probably the most
> > > important target in that group.
> > >
> > > I would suggest the following:
> > >
> > > 1. Change gdb's default to use a0 register, so that bare-metal works.
> > > 2. If possible, add osabi sniffers to uclinux, openbsdb and rtems, that
> > > will cause gdb to use a1.
>
> OpenBSD is easy. Shouldn't RTEMS use a0, from your tables above?
Also correct.
Ralf