This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reporting the OSABI in target descriptions.

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:
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.



	* 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.  */
   if (info->osabi == GDB_OSABI_UNKNOWN)
     info->osabi = GDB_OSABI_DEFAULT;
   /* 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]