From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3058 invoked by alias); 20 Jul 2009 19:54:19 -0000 Received: (qmail 3040 invoked by uid 22791); 20 Jul 2009 19:54:18 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Jul 2009 19:54:13 +0000 Received: (qmail 18458 invoked from network); 20 Jul 2009 19:54:10 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Jul 2009 19:54:10 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: Reporting the OSABI in target descriptions. Date: Mon, 20 Jul 2009 21:06:00 -0000 User-Agent: KMail/1.9.10 Cc: "Ulrich Weigand" , Eli Zaretskii References: <200907201945.n6KJjP96016621@d12av02.megacenter.de.ibm.com> In-Reply-To: <200907201945.n6KJjP96016621@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907202055.01124.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00496.txt.bz2 On Monday 20 July 2009 20:45:25, Ulrich Weigand wrote: > Pedro Alves wrote: > > On Monday 20 July 2009 14:40:56, Pedro Alves wrote: > > > On Friday 17 July 2009 13:43:35, Ulrich Weigand wrote: > > > > > > > I'm wondering whether you're planning to commit your patch soon; this > > > > would allow me to reconcile the conflicts. > > > > > > I saw that Eli had some remarks in the docs parts of the patch. I'll > > > try to handle those today. > > > > > > > The patch is in now. > > Thanks, Pedro! > > Unfortunately the patch caused a build break for the spu-elf target > (and presumably others) because it does not define a "default" OS/ABI. > > This causes the GDB_OSABI_DEFAULT macro to remain undefined. The > existing usage in osabi.c handled this via: > #ifndef GDB_OSABI_DEFAULT > #define GDB_OSABI_DEFAULT GDB_OSABI_UNKNOWN > #endif > at the top of the file. > D'oh! > The new usage your patch introduced in arch-utils.c is not likewise > protected, causing compilation to fail. > > I've fixed this by the following patch; fixes compilation on spu-elf. > Committed to mainline. Moving that ifndef/define/endif to defs.h close to the osabi enum would avoid such issues and centralise the #ifdefery --- I think I just assumed that's what was happening, but I can't debug myself now --- , but it's not worth the bother now, since your patch is certainly fine! Sorry and thank you! > > Bye, > Ulrich > > ChangeLog: > > * arch-utils.c (gdbarch_info_fill): Only reference GDB_OSABI_DEFAULT > if the macro is defined. > > Index: src/gdb/arch-utils.c > =================================================================== > --- src.orig/gdb/arch-utils.c > +++ src/gdb/arch-utils.c > @@ -731,8 +731,10 @@ gdbarch_info_fill (struct gdbarch_info * > if (info->osabi == GDB_OSABI_UNKNOWN && info->target_desc != NULL) > info->osabi = tdesc_osabi (info->target_desc); > /* From the configured default. */ > +#ifdef GDB_OSABI_DEFAULT > if (info->osabi == GDB_OSABI_UNKNOWN) > info->osabi = GDB_OSABI_DEFAULT; > +#endif > > /* Must have at least filled in the architecture. */ > gdb_assert (info->bfd_arch_info != NULL); > > > -- Pedro Alves