From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31485 invoked by alias); 10 Dec 2009 11:13:23 -0000 Received: (qmail 31474 invoked by uid 22791); 10 Dec 2009 11:13:23 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Dec 2009 11:13:18 +0000 Received: (qmail 13830 invoked from network); 10 Dec 2009 11:13:16 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 Dec 2009 11:13:16 -0000 From: Vladimir Prus To: gdb@sources.redhat.com Subject: Re: Does m68klinux-tdep.c handle uclinux too Date: Thu, 10 Dec 2009 11:13:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-14-generic-pae; KDE/4.3.2; i686; ; ) References: <200912101252.29827.vladimir@codesourcery.com> In-Reply-To: <200912101252.29827.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200912101413.13246.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: 2009-12/txt/msg00062.txt.bz2 On Thursday 10 December 2009 12:52:29 Vladimir Prus wrote: > > Hi, > > looking at m68klinux-tdep.c, I see this: > > if (target_is_uclinux == -1) > { > /* Determine whether we are running on a uClinux or normal GNU/Linux > target so we can use the correct sigcontext layouts. */ > CORE_ADDR dummy; > > target_is_uclinux > = (target_auxv_search (¤t_target, AT_NULL, &dummy) > 0 > && target_auxv_search (¤t_target, AT_PAGESZ, &dummy) == 0); > } > > However, looking at configure.tgt, I see: > > m68*-*-aout* | m68*-*-coff* | m68*-*-elf* | m68*-*-rtems* | m68*-*-uclinux* | \ > fido-*-elf*) > # Target: Motorola m68k embedded (e.g. bug monitors) > gdb_target_obs="m68k-tdep.o monitor.o dbug-rom.o dsrec.o" > ;; > > > So, it seems that m68klinux-tdep.c is not even compiled for uclinux target. > Then, is something here that needs fixing? FWIW, below is a local patch that we have. Does it seem reasonable? - Volodya --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -280,12 +280,12 @@ m68hc11*-*-*|m6811*-*-*) gdb_sim=../sim/m68hc11/libsim.a ;; -m68*-*-aout* | m68*-*-coff* | m68*-*-elf* | m68*-*-rtems* | m68*-*-uclinux* | \ +m68*-*-aout* | m68*-*-coff* | m68*-*-elf* | m68*-*-rtems* | \ fido-*-elf*) # Target: Motorola m68k embedded (e.g. bug monitors) gdb_target_obs="m68k-tdep.o monitor.o dbug-rom.o dsrec.o" ;; -m68*-*-linux*) +m68*-*-linux* | m68*-*-uclinux*) # Target: Motorola m68k with a.out and ELF gdb_target_obs="m68k-tdep.o m68klinux-tdep.o solib.o solib-svr4.o \ glibc-tdep.o symfile-mem.o" @@ -616,6 +616,7 @@ esac case "${targ}" in *-*-freebsd*) gdb_osabi=GDB_OSABI_FREEBSD_ELF ;; *-*-linux*) gdb_osabi=GDB_OSABI_LINUX ;; +*-*-uclinux*) gdb_osabi=GDB_OSABI_LINUX ;; *-*-nto*) gdb_osabi=GDB_OSABI_QNXNTO ;; m68*-*-openbsd* | m88*-*-openbsd* | vax-*-openbsd*) ;; *-*-openbsd*) gdb_osabi=GDB_OSABI_OPENBSD_ELF ;;