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


On 01/31/2012 11:13 PM, Doug Evans wrote:
On Tue, Jan 31, 2012 at 1:59 PM, Tom Tromey<tromey@redhat.com> wrote:
This fixes PR python/13351.

The bug is that gdb.lookup_symbol required a current frame, but this
restriction doesn't really make sense.  It is ok to look up global
symbols without a current frame.

This patch just lifts the restriction.

This requires a doc review.

Built and regtested on x86-64 Fedora 15.

Tom

2012-01-31 Tom Tromey<tromey@redhat.com>

        PR python/13351:
        * python/py-symbol.c (gdbpy_lookup_symbol): Work even when there
        is no frame.
I think a bit of discussion is needed. [Sorry!]

There is also lookup_global_symbol.
Are we sure we want lookup_symbol to work when there is no frame?
[it doesn't feel very clean to me, but maybe I just need to look at it
differently]

I agree that two APIs for the same functionality are a pain. However we have to keep them for backwards compatibility.
However, can we not deprecated and even gut lookup_global_symbol to call lookup_symbol with a frame?


Cheers,

Phil


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