From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16433 invoked by alias); 14 May 2012 15:06:16 -0000 Received: (qmail 16415 invoked by uid 22791); 14 May 2012 15:06:15 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_BJ 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; Mon, 14 May 2012 15:06:01 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C397E1C6E42; Mon, 14 May 2012 11:06:00 -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 udd-nfIO58Sc; Mon, 14 May 2012 11:06:00 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 927861C630C; Mon, 14 May 2012 11:06:00 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id A5019145616; Mon, 14 May 2012 08:05:52 -0700 (PDT) Date: Mon, 14 May 2012 15:06:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: Regression for gdb.fortran/library-module.exp [Re: [RFA] choose symbol from given block's objfile first.] Message-ID: <20120514150552.GH10253@adacore.com> References: <1336430581-11262-1-git-send-email-brobecker@adacore.com> <874nrqvbeh.fsf@fleche.redhat.com> <20120509190529.GI15555@adacore.com> <20120511072606.GA25458@host2.jankratochvil.net> <20120514143927.GB10253@adacore.com> <20120514145151.GA30451@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120514145151.GA30451@host2.jankratochvil.net> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2012-05/txt/msg00513.txt.bz2 > > There is an intermediate solution, which is to always search the > > main objfile first, and then the current DSO, and then the rest. > > Some such order may be what ld.so does for the symbol search which > should be the real right solution. Is it possible to link an executable that defines a global variable against a shared library that also defines a global variable with the same name? It's something I tried on GNU/Linux, but the linker rejected the link. If that's something that's not possible, then I am OK with that intermediate solution, because it means that real duplicates are going to be only within shared libraries. If it's defined inside the main objfile, then it cannot be defined as a global in any other shared library, and we should be OK. > Except for that there is probably wrong debug info in some cases from > GCC and (a) I believe GDB should try to be compatible with current > widespread buggy GCC debug info, (b) We may try to propose fixing the > GCC produced debug info but I have no idea how yet, some such > possibilities were described in > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40040 I agree with both. -- Joel