From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12217 invoked by alias); 18 Sep 2009 16:25:22 -0000 Received: (qmail 12205 invoked by uid 22791); 18 Sep 2009 16:25:20 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Sep 2009 16:25:14 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id B21E710C63; Fri, 18 Sep 2009 16:25:12 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 7021010927; Fri, 18 Sep 2009 16:25:12 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MogGl-0006hz-BF; Fri, 18 Sep 2009 12:25:11 -0400 Date: Fri, 18 Sep 2009 16:25:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: Pedro Alves , gdb-patches@sourceware.org, Mark Kettenis , brobecker@adacore.com, teawater@gmail.com, msnyder@vmware.com Subject: Re: [RFA] Check solib bfd arch Message-ID: <20090918162511.GA25315@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , Pedro Alves , gdb-patches@sourceware.org, Mark Kettenis , brobecker@adacore.com, teawater@gmail.com, msnyder@vmware.com References: <200909181553.45603.pedro@codesourcery.com> <200909181614.n8IGEWWB006667@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909181614.n8IGEWWB006667@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes 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: 2009-09/txt/msg00599.txt.bz2 On Fri, Sep 18, 2009 at 06:14:32PM +0200, Ulrich Weigand wrote: > Pedro Alves wrote: > > > Could we compare the solib's target arch with > > tdesc_architecture(target_read_description()) directly --- but only > > if available ---, instead of comparing it with target_gdbarch? > > Hmm, this would ignore the work done by choose_architecture_for_target. > > Maybe we should compare against target_gdbarch, but only if a target > description is present? Just wrap the whole test as-is in a > if (target_read_description ()) > ... A description can cover many areas, but is not required to cover any of them. I don't think anything should rely on "is there a description". It does seem to me like the test should be symmetric here: a = bfd_get_arch_info (abfd); if (b->compatible (b, a) != b && a->compatible (a, b) != a) The current version is only right if we know the most specific supported architecture for the target, which I think is not the question we ought to ask. We get away with this in osabi.c because we know that handler->arch_info is the most general supported architecture for the OSABI handler. -- Daniel Jacobowitz CodeSourcery