This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: fix PR python/13351


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]