From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18193 invoked by alias); 22 Oct 2003 19:09:51 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18184 invoked from network); 22 Oct 2003 19:09:50 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 22 Oct 2003 19:09:50 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 014532B89; Wed, 22 Oct 2003 14:49:12 -0400 (EDT) Message-ID: <3F96D128.5040904@redhat.com> Date: Wed, 22 Oct 2003 19:09:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Blandy Cc: gdb-patches@sources.redhat.com, Kris Warkentin , Daniel Jacobowitz Subject: Re: RFA: osabi: correct test for compatible handlers References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00653.txt.bz2 > + /* BFD's 'A->compatible (A, B)' functions return zero if A and B are > + incompatible. But if they are compatible, it returns the 'more > + featureful' of the two arches. That is, if A can run code > + written for B, but B can't run code written for A, then it'll > + return A. > + > + struct bfd_arch_info objects are atoms: that is, there's supposed > + to be exactly one instance for a given machine. So you can tell > + whether two are equivalent by comparing pointers. */ > + return (a == b || a->compatible (a, b) == a); Hey, nice. Don't worry about a can_run_code_for function though, having the logic inline makes what's happening easier to understand (and will simplify a follow-on wild-card patch I've got pending). Andrew