This is the mail archive of the gdb-patches@sourceware.org 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: ColdFire/fido support


On Mon, May 28, 2007 at 03:42:47PM +0400, Vladimir Prus wrote:
> On Sunday 06 May 2007 15:52, Vladimir Prus wrote:
> > On Saturday 05 May 2007 15:02, Andreas Schwab wrote:
> > > Vladimir Prus <vladimir@codesourcery.com> writes:
> > > 
> > > > +  /* Is this ColdFire architecture, as opposed to generic m68k?  */
> > > > +  int coldfire;
> > > > + 
> > > > +  /* Is this fido architecture, as opposed to generic m68k?  */
> > > > +  int fido;
> > > 
> > > How about making this a single enum?  They surely can never both be
> > > non-zero at the same time.
> > 
> > Good idea. Here's a revised patch.
> 
> Any comments? I attach the patch again for convenience.

This is mostly OK.  Please add a Makefile.in update for the new
#include.  Also, we've added XML support for another target.  So it
needs a new section in the manual describing which targets support
XML registers, and which registers are required.

> +      if (feature == NULL)
> +	{
> +	  feature = tdesc_find_feature (info.target_desc,
> +					"org.gnu.gdb.coldfire.core");
> +	  if (feature != NULL)
> +	    flavour = m68k_coldfire_flavour;
> +	}

> +  /* 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 sets flavour partly based on the target, and partly based on the
object file.  That's a bit confusing - we can determine float return
behavior strictly from the object file, and it's only the object
file's behavior that matters.

-- 
Daniel Jacobowitz
CodeSourcery


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