This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: ColdFire/fido support
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Andreas Schwab <schwab at suse dot de>, gdb-patches at sources dot redhat dot com
- Date: Fri, 8 Jun 2007 14:58:36 +0400
- Subject: Re: ColdFire/fido support
- References: <200705051337.02114.vladimir@codesourcery.com> <200705281542.47676.vladimir@codesourcery.com> <20070605151843.GA27064@caradoc.them.org>
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