From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17789 invoked by alias); 9 May 2012 21:48:21 -0000 Received: (qmail 17781 invoked by uid 22791); 9 May 2012 21:48:20 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO,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; Wed, 09 May 2012 21:48:07 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2F1B31C6A3B; Wed, 9 May 2012 17:48:07 -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 Q5ClztB+k49j; Wed, 9 May 2012 17:48:07 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id F15D81C6669; Wed, 9 May 2012 17:48:06 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id ABE5F145616; Wed, 9 May 2012 14:47:58 -0700 (PDT) Date: Wed, 09 May 2012 21:48:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA] choose symbol from given block's objfile first. Message-ID: <20120509214758.GQ15555@adacore.com> References: <1336430581-11262-1-git-send-email-brobecker@adacore.com> <874nrqvbeh.fsf@fleche.redhat.com> <20120509190529.GI15555@adacore.com> <20120509190753.GA31769@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120509190753.GA31769@adacore.com> 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/msg00324.txt.bz2 > > Attached are two patches, the first being the code change, and the > > second a testcase for it. And here is a second testcase that gets fixed by this patch as well. I suspect the reason why my patch fixes it is because the variables in the shared libraries must be LOC_UNRESOLVED, and thus resolved through default_read_var_value/lookup_minimal_symbol. gdb/testsuite/ChangeLog: * gdb.base/print-file-var-lib1.c, gdb.base/print-file-var-lib2.c, gdb.base/print-file-var-main.c, gdb.base/print-file-var.exp: New files. gdb/ChangeLog: * config/djgpp/fnchange.lst: Add entries for print-file-var-lib1.c, print-file-var-lib2.c, print-file-var-main.c and print-file-var.exp (located in gdb/testsuite/gdb.base). Tested on x86_64-linux. -- Joel