From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22226 invoked by alias); 30 Sep 2007 18:13:14 -0000 Received: (qmail 22218 invoked by uid 22791); 30 Sep 2007 18:13:13 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 30 Sep 2007 18:13:11 +0000 Received: (qmail 4214 invoked from network); 30 Sep 2007 18:13:09 -0000 Received: from unknown (HELO h38.net64.aknet.ru) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 30 Sep 2007 18:13:09 -0000 From: Vladimir Prus To: Daniel Jacobowitz Subject: Re: m68k structure return register Date: Sun, 30 Sep 2007 20:40:00 -0000 User-Agent: KMail/1.9.6 Cc: gdb@sources.redhat.com References: <200706201325.07067.vladimir@codesourcery.com> <200709191224.28030.vladimir@codesourcery.com> <20070919133136.GA29941@caradoc.them.org> In-Reply-To: <20070919133136.GA29941@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709302213.04766.vladimir@codesourcery.com> 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/msg00281.txt.bz2 On Wednesday 19 September 2007 17:31:36 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; I suspect both uclinuxoldabi > and uclinux are. You can differentiate based on ELF-ness in > m68k_gdbarch_init. Lots of other targets do that too. Then you can > set the default to a1 for non-ELF and a0 for ELF, and that will fix > m68k-elf and m68k-rtems without breaking m68k-aout or m68k-coff. Yeah, that's better. > m68k-uclinux and m68k-uclinuxoldabi are harder. Do you know how old > m68k-uclinuxoldabi is, and whether we need to support it in GDB? No. > If not, you can treat it just like m68k-linux. It is likely that > the Linux OS/ABI sniffer will already accept uClinux binaries. It does not seem so. The debuggable .gdb ELF binary does not have the .note.ABI-tag section so the linux sniffer won't catch it. Is there anything else I can check for? - Volodya