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] Call overloaded operators to perform valid Python operations on struct/class values.


I do not think there was an agreement on whether to have this feature
or not. Based on the points raised by Doug, my personal opinion is
that we should have this feature along with the facility (which in my
opinion is a cool fallback when no other Pythonic way works) suggested
by Doug.  To keep the discussion moving for both the ideas, I am
sending a patch which addresses the nits pointed out by Doug on my
first patch.  I will hopefully find time during the holidays to work
on the feature suggested by Doug.

2013-12-20  Siva Chandra Reddy  <sivachandra@google.com>

        Call overloaded operators to perform valid Python operations on
        struct/class values.
        * NEWS (Python Scripting): Add entry for this new feature.
        * python/py-value.c (valpy_binop): Call value_x_binop for struct
        and class values.

        testsuite/
        * gdb.python/py-value-cc.cc: Improve test case to enable testing
        operations on gdb.Value objects.
        * gdb.python/py-value-cc.exp: Add new test to test operations on
        gdb.Value objects.

        doc/
        * gdb.texinfo (Values From Inferior): Add description about
        performing valid Python operations on gdb.Value objects.

Attachment: python_op_patch_v2.txt
Description: Text document


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