ColdFire/fido support

Andreas Schwab schwab@suse.de
Sat Jun 30 15:47:00 GMT 2007


Vladimir Prus <vladimir@codesourcery.com> writes:

> +  /* The mechanism for returning floating values from function
> +     and the type of long double depend on whether we're
> +     on ColdFire or standard m68k. */
> +
> +  if (info.bfd_arch_info)
> +    {
> +      const bfd_arch_info_type *coldfire_arch = 
> +	bfd_lookup_arch (bfd_arch_m68k, bfd_mach_mcf_isa_a_nodiv);
> +
> +      if (coldfire_arch
> +	  && (*info.bfd_arch_info->compatible) 
> +	  (info.bfd_arch_info, coldfire_arch))
> +	flavour = m68k_coldfire_flavour;
> +    }

This always sets flavour to m68k_coldfire_flavour, since any m68k arch
is always compatible with the generic m68k architecture.

Andreas.

2007-06-30  Andreas Schwab  <schwab@suse.de>

	* m68k-tdep.c (m68k_gdbarch_init): Don't infer coldfire flavour
	from the generic m68k arch.

--- gdb/m68k-tdep.c.~1.120.~	2007-06-19 11:04:57.000000000 +0200
+++ gdb/m68k-tdep.c	2007-06-30 17:26:39.000000000 +0200
@@ -1110,14 +1110,14 @@ m68k_gdbarch_init (struct gdbarch_info i
      and the type of long double depend on whether we're
      on ColdFire or standard m68k. */
 
-  if (info.bfd_arch_info)
+  if (info.bfd_arch_info && info.bfd_arch_info->mach != 0)
     {
       const bfd_arch_info_type *coldfire_arch = 
 	bfd_lookup_arch (bfd_arch_m68k, bfd_mach_mcf_isa_a_nodiv);
 
       if (coldfire_arch
-	  && (*info.bfd_arch_info->compatible) 
-	  (info.bfd_arch_info, coldfire_arch))
+	  && ((*info.bfd_arch_info->compatible) 
+	      (info.bfd_arch_info, coldfire_arch)))
 	flavour = m68k_coldfire_flavour;
     }
   

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Gdb-patches mailing list