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 Tuesday 05 June 2007 19:18, Daniel Jacobowitz wrote:

> > +  /* 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.

Not necessary. You can connect to a stub without having a file at all,
and you'd still want to have some coldfire-specific behaviour, for example
this:

	 if (flavour == m68k_coldfire_flavour || flavour == m68k_fido_flavour)
	    set_gdbarch_decr_pc_after_break (gdbarch, 2);

if you determine flavour based solely on file, then if you connect to a stub
without having any file at all, no flavour will be detected, and breakpoints won't
work correctly.

I suppose I can add file-based detection for fido, just like it's done for coldfire,
but I don't think removing XML-based detection is right. What do you think?

- Volodya


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