This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: fix PR python/13351
- From: Tom Tromey <tromey at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 01 Feb 2012 09:01:39 -0700
- Subject: Re: RFA: fix PR python/13351
- References: <m339avednx.fsf@fleche.redhat.com> <CADPb22T79CrHOqFG2RJMf6DBg93Jytd8hr8NJxdW=U71AH3cEA@mail.gmail.com>
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> I think a bit of discussion is needed. [Sorry!]
No problem.
Doug> Are we sure we want lookup_symbol to work when there is no frame?
Doug> [it doesn't feel very clean to me, but maybe I just need to look at it
Doug> differently]
lookup_symbol already works without a frame, if you pass in a block.
To me it seemed reasonable to extend this to search the global blocks.
After all, even with a block argument it might return a symbol from a
global block -- it is just that there is no way to request this from the
start.
That is, I didn't see a particular compelling reason for the current
restriction. What is the point of this error?
What seems not-clean to you?
Actually I wonder whether this patch goes far enough. I think perhaps
it should be possible to write lookup_symbol(block = None) to get the
no-frame behavior; and also lookup_symbol(block = some_frame) to take
the block from an explicit frame.
Tom