RFA: fix PR python/13351

Tom Tromey tromey@redhat.com
Wed Feb 1 16:02:00 GMT 2012


>>>>> "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



More information about the Gdb-patches mailing list