From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24876 invoked by alias); 18 Sep 2009 14:53:32 -0000 Received: (qmail 24863 invoked by uid 22791); 18 Sep 2009 14:53:31 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Sep 2009 14:53:27 +0000 Received: (qmail 20958 invoked from network); 18 Sep 2009 14:53:25 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 Sep 2009 14:53:25 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA] Check solib bfd arch Date: Fri, 18 Sep 2009 14:53:00 -0000 User-Agent: KMail/1.9.10 Cc: Daniel Jacobowitz , Mark Kettenis , uweigand@de.ibm.com, brobecker@adacore.com, teawater@gmail.com, msnyder@vmware.com References: <200909181250.n8ICoMmD010948@d12av02.megacenter.de.ibm.com> <200909181407.n8IE7ktV013370@brahms.sibelius.xs4all.nl> <20090918143909.GA10099@caradoc.them.org> In-Reply-To: <20090918143909.GA10099@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909181553.45603.pedro@codesourcery.com> 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/msg00594.txt.bz2 On Friday 18 September 2009 15:39:09, Daniel Jacobowitz wrote: > I suspect the check is going to be problematic whether we do this or > not, though. 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? In pseudo-patch: - b = gdbarch_bfd_arch_info (target_gdbarch); - if (b->compatible (b, bfd_get_arch_info (abfd)) != b) + tdesc = target_read_description (); + b = (tdesc != NULL) ? gdbarch_bfd_arch_info (tdesc_architecture (tdesc)) : NULL; + if (b != NULL && b->compatible (b, bfd_get_arch_info (abfd)) != b) warning (_("`%s': Shared library architecture %s is not compatible " "with target architecture %s."), found_pathname, bfd_get_arch_info (abfd)->printable_name, b->printable_name); -- Pedro Alves