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] Debug Operators with GDB Python


On Fri, Dec 7, 2012 at 4:59 PM, Doug Evans <dje@google.com> wrote:
> IWBN if the user didn't have to deal with this, and it all just fell
> out from gdb's existing support that it already has to get right if it
> hand-called the inferior's operator implementation.

I spent the weekend thinking through a way on how to add 'debug
methods' for C++ alone. When I consider C++ alone, lot of
arguments/points that you have made make a lot more sense to me. I
have started putting together a patch which adds the ability to define
'debug methods' in Python for C++. I hope to have a working version by
the end of this week. We can probably compare with the first patch I
sent out and debate further.

> Plus I don't know what behaviours other languages impose on operator support.
> The current design may be excessively c++-specific already.
> Do you, or anyone, know how this might get used in other languages
> that gdb supports?

One way I have wanted to look at it is that, if you are writing Python
code, expect Python behavior. That is, treat 'is a' and polymorphic
behavior of operand objects in the way Python treats them. But then,
should an extension written in Guile impose Guile semantics?


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