This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: FYI: make current_objfile local to symbol readers
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: tromey at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 14 Jun 2011 19:52:35 +0200 (CEST)
- Subject: Re: FYI: make current_objfile local to symbol readers
- References: <m3sjrcpdde.fsf@fleche.redhat.com>
>
> 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...