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: [RFC] [PATCH] Provide the ability to write the frame unwinder in Python


On Thu 19 Mar 2015 01:36, Alexander Smundak <asmundak@google.com> writes:

>> Regarding the result of an unwinder/sniffer,
>> If I approach this from the point of view of what's
>> easy to explain, it feels like the result of an Unwinder
>> is a Frame.
> It is logical, but that's not what GDB core expects from the unwinder.
> I hesitate to have Python frame unwinder API differ too much from
>  the underlying GDB core API.

I agree with Alexander.  If it were really a frame you'd have to expose
a frame constructor to Python/GDB, and then would the resulting frame be
interned?  What would happen if you built a frame but then returned
None, or threw an exception?  Would there be side effects to the frame
cache?  And if not, could you hold on to the frame?  Would it be equal
to frame.newer().older() ?  Better to return data instead, which GDB
uses to build the actual frame.

Andy


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