From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11373 invoked by alias); 18 Sep 2009 14:24:14 -0000 Received: (qmail 11360 invoked by uid 22791); 18 Sep 2009 14:24:12 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Sep 2009 14:24:08 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5E4832BAABF; Fri, 18 Sep 2009 10:24:06 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nzuNqus-F3MX; Fri, 18 Sep 2009 10:24:06 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C76612BAAB1; Fri, 18 Sep 2009 10:24:05 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 519CEF592B; Fri, 18 Sep 2009 07:23:55 -0700 (PDT) Date: Fri, 18 Sep 2009 14:24:00 -0000 From: Joel Brobecker To: Ulrich Weigand , Hui Zhu , gdb-patches ml , Michael Snyder Subject: Re: [RFA] Check solib bfd arch Message-ID: <20090918142355.GN8910@adacore.com> References: <20090917225633.GA29769@adacore.com> <200909181250.n8ICoMmD010948@d12av02.megacenter.de.ibm.com> <20090918131022.GA31756@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090918131022.GA31756@caradoc.them.org> User-Agent: Mutt/1.5.18 (2008-05-17) 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/msg00591.txt.bz2 > I'll pick an example I know better. Suppose a binary is built for > a PowerPC 603 but it loads a shared library built for a PowerPC 7400 > with Altivec. The check would fail in the way Joel described if we're > getting the architecture from the input file, but this is a valid > operation. If we're getting it from the target, then we've got the > wrong architecture if PowerPC 7400 binaries were supported - clearly > it isn't a 603. But not all targets report the architecture. That's exactly what I thought was happening. I remembered that the architecture is determined from the binary, so I assumed that my executable was built as a sparcv9 but it was linking in a sparcv9a shared library. Marc's suggestion of enhancing the nat module for Sparc to detect if the machine can run Sparcv9 is interesting, but we would still have the same issue if we were cross debugging, no? -- Joel