Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: "Ulrich Weigand" <uweigand@de.ibm.com>,  Eli Zaretskii <eliz@gnu.org>
Subject: Re: Reporting the OSABI in target descriptions.
Date: Mon, 20 Jul 2009 21:06:00 -0000	[thread overview]
Message-ID: <200907202055.01124.pedro@codesourcery.com> (raw)
In-Reply-To: <200907201945.n6KJjP96016621@d12av02.megacenter.de.ibm.com>

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


      reply	other threads:[~2009-07-20 19:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 21:18 Pedro Alves
2009-07-06 15:17 ` Pedro Alves
2009-07-06 20:29   ` Eli Zaretskii
2009-07-20 18:38     ` Pedro Alves
2009-07-20 18:53       ` Eli Zaretskii
2009-07-17 14:55   ` Ulrich Weigand
2009-07-20 14:01     ` Pedro Alves
2009-07-20 19:54       ` Pedro Alves
2009-07-20 19:56         ` Ulrich Weigand
2009-07-20 21:06           ` Pedro Alves [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200907202055.01124.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox