From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8475 invoked by alias); 1 Jul 2009 06:55:30 -0000 Received: (qmail 8461 invoked by uid 22791); 1 Jul 2009 06:55:29 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f203.google.com (HELO mail-pz0-f203.google.com) (209.85.222.203) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Jul 2009 06:55:22 +0000 Received: by pzk41 with SMTP id 41so630886pzk.12 for ; Tue, 30 Jun 2009 23:55:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.104.9 with SMTP id b9mr847845wfc.21.1246431320533; Tue, 30 Jun 2009 23:55:20 -0700 (PDT) In-Reply-To: <4A4AE147.5060800@vmware.com> References: <4A4AE147.5060800@vmware.com> Date: Wed, 01 Jul 2009 06:55:00 -0000 Message-ID: Subject: Re: What about check the bfd_arch_info before load the solib? From: Hui Zhu To: Michael Snyder Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00001.txt.bz2 On Wed, Jul 1, 2009 at 12:08, Michael Snyder wrote: > Hui Zhu wrote: >> >> Hi guys, >> >> In cross-compile remote debug environment, the gdb will load the solib >> of local host if user doesn't set sysroot or something. >> Load the wrong lib will make gdb get error. >> >> I think maybe we can add some check code to check if the bfd_arch_info >> of this solib is same with the current_gdbarch before load this solib >> in. >> If not same, output a warning to let user set gdb to load right lib. >> >> What do you think about it? > > It would certainly be reasonable to reject an object file (eg. shlib) > if it has the wrong architecture type. =A0I'm surprised that we don't > already do it. Me too. I will try to make a patch for it. Thanks, Hui