From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30686 invoked by alias); 20 Jul 2009 19:45:46 -0000 Received: (qmail 30634 invoked by uid 22791); 20 Jul 2009 19:45:43 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mtagate2.de.ibm.com (HELO mtagate2.de.ibm.com) (195.212.17.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Jul 2009 19:45:33 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.13.1/8.13.1) with ESMTP id n6KJjQXO000339 for ; Mon, 20 Jul 2009 19:45:26 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n6KJjQj82740268 for ; Mon, 20 Jul 2009 21:45:26 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n6KJjQFo016631 for ; Mon, 20 Jul 2009 21:45:26 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n6KJjP96016621; Mon, 20 Jul 2009 21:45:25 +0200 Message-Id: <200907201945.n6KJjP96016621@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 20 Jul 2009 21:45:25 +0200 Subject: Re: Reporting the OSABI in target descriptions. To: pedro@codesourcery.com (Pedro Alves) Date: Mon, 20 Jul 2009 19:56:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, eliz@gnu.org (Eli Zaretskii) In-Reply-To: <200907201954.05104.pedro@codesourcery.com> from "Pedro Alves" at Jul 20, 2009 07:54:04 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00495.txt.bz2 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. 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. 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); -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com