This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/Patch] Call overloaded operators to perform valid Python operations on struct/class values.
- From: Siva Chandra <sivachandra at google dot com>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 6 Dec 2013 06:20:34 -0800
- Subject: Re: [RFC/Patch] Call overloaded operators to perform valid Python operations on struct/class values.
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gxk9zcLKQ1Ef2XhgUMCyB8MB1v=6tA4jsfPyEFgxR8bNw at mail dot gmail dot com> <m31u1q1oq0 dot fsf at sspiff dot org>
Thanks for taking a look Doug. I will address the nits if there is
interest in getting this in.
On Thu, Dec 5, 2013 at 10:24 PM, Doug Evans <xdje42@gmail.com> wrote:
> It feels sexy and all, but it's not clear to me going this path is a net win.
> If we could release it as experimental, without any promises to keep it
> or change it in incompatible ways, I'd say go for it.
> I'm curious what others think.
My main motivation to have something like this has been to aid
implementing "debug methods" that I have in my other patch. Same can
be said about non-operator methods as well, but clearly, allowing
methods to be invoked via the '.' operator on gdb.Value objects is
bad. I could not think of any reason why it could be bad to not allow
operators.
Thanks,
Siva Chandra
PS: For methods in general, I have ideas on how we can facilitate
calling them from Python. But, it is probably premature at this point
to talk about it if we have not yet decided about how "debug methods"
feature would eventually look like.