From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4950 invoked by alias); 20 Sep 2007 05:58:00 -0000 Received: (qmail 4941 invoked by uid 22791); 20 Sep 2007 05:57:59 -0000 X-Spam-Check-By: sourceware.org Received: from mout2.freenet.de (HELO mout2.freenet.de) (195.4.92.92) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 20 Sep 2007 05:57:47 +0000 Received: from [195.4.92.17] (helo=mx7.freenet.de) by mout2.freenet.de with esmtpa (Exim 4.68-dev) (envelope-from ) id 1IYF2k-0005mT-H2; Thu, 20 Sep 2007 07:57:42 +0200 Received: from hsi-kbw-082-212-056-027.hsi.kabelbw.de ([82.212.56.27]:59649 helo=[192.168.1.100]) by mx7.freenet.de with esmtpsa (ID ralf.corsepius@freenet.de) (SSLv3:RC4-MD5:128) (port 465) (Exim 4.68-dev #12) id 1IYF2k-00085r-EW; Thu, 20 Sep 2007 07:57:42 +0200 Subject: Re: m68k structure return register From: Ralf Corsepius To: Daniel Jacobowitz Cc: Vladimir Prus , gdb@sources.redhat.com, Chris Johns In-Reply-To: <20070919133136.GA29941@caradoc.them.org> References: <200706201325.07067.vladimir@codesourcery.com> <200709191224.28030.vladimir@codesourcery.com> <20070919133136.GA29941@caradoc.them.org> Content-Type: text/plain Date: Thu, 20 Sep 2007 09:06:00 -0000 Message-Id: <1190267859.11618.185.camel@mccallum.corsepiu.local> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-4.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00157.txt.bz2 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