This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: ColdFire/fido support
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, gdb-patches at sources dot redhat dot com
- Date: Tue, 5 Jun 2007 11:18:43 -0400
- Subject: Re: ColdFire/fido support
- References: <200705051337.02114.vladimir@codesourcery.com> <jeejlvleif.fsf@sykes.suse.de> <200705061552.15456.vladimir@codesourcery.com> <200705281542.47676.vladimir@codesourcery.com>
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