From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17712 invoked by alias); 14 Jun 2011 17:52:57 -0000 Received: (qmail 17704 invoked by uid 22791); 14 Jun 2011 17:52:56 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Jun 2011 17:52:42 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id p5EHqbAO002728; Tue, 14 Jun 2011 19:52:37 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id p5EHqZix005374; Tue, 14 Jun 2011 19:52:35 +0200 (CEST) Date: Tue, 14 Jun 2011 17:52:00 -0000 Message-Id: <201106141752.p5EHqZix005374@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: tromey@redhat.com CC: gdb-patches@sourceware.org In-reply-to: (message from Tom Tromey on Tue, 14 Jun 2011 10:49:17 -0600) Subject: Re: FYI: make current_objfile local to symbol readers References: 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: 2011-06/txt/msg00192.txt.bz2 > > I'm checking this in on the trunk. > > The global 'current_objfile' is used by some symbol readers, but only in > a local way. This patch removes makes this global be local to the > readers which use it. I think this is clearer and also prevents new > (bad) uses of this global in the future. > > Built and regtested on the buildbot. But isn't it a bad idea to have multiple static variables with the same name? It makes inspecting the variable with GDB a bit more difficult...