From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14129 invoked by alias); 8 Jun 2007 10:58:45 -0000 Received: (qmail 14120 invoked by uid 22791); 8 Jun 2007 10:58:44 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Jun 2007 10:58:42 +0000 Received: (qmail 31024 invoked from network); 8 Jun 2007 10:58:40 -0000 Received: from unknown (HELO wind.lvk.cs.msu.su) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Jun 2007 10:58:40 -0000 From: Vladimir Prus To: Daniel Jacobowitz Subject: Re: ColdFire/fido support Date: Fri, 08 Jun 2007 10:58:00 -0000 User-Agent: KMail/1.9.1 Cc: Andreas Schwab , gdb-patches@sources.redhat.com References: <200705051337.02114.vladimir@codesourcery.com> <200705281542.47676.vladimir@codesourcery.com> <20070605151843.GA27064@caradoc.them.org> In-Reply-To: <20070605151843.GA27064@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706081458.36645.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00108.txt.bz2 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