This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH libstdc++ v3] - Add xmethods for std::vector and std::unique_ptr
- From: Siva Chandra <sivachandra at google dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Doug Evans <dje at google dot com>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 5 Aug 2014 13:29:40 -0700
- Subject: Re: [PATCH libstdc++ v3] - Add xmethods for std::vector and std::unique_ptr
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gzd5vne8B4f-u5k98QqwJB23rv3M_WgxqJL-sY6RoQAsA at mail dot gmail dot com> <CAH6eHdQNWPibS1dbPGBSydg3QnMbB3g6HG7QGLaTs7HbZdNjig at mail dot gmail dot com>
Hi Jonathan,
Thanks a lot for taking a look. The patch in question, and the GDB
support, do not yet work with Python3. If that is a necessary
requirement, I can make the changes and send a new version of the
patch.
Thanks,
Siva Chandra
On Mon, Aug 4, 2014 at 2:36 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 25 July 2014 20:46, Siva Chandra wrote:
>> The attached patch is identical to v2 except that I rebased it over
>> the current head.
>>
>> To recollect, GDB now supports xmethods in its Python API:
>> https://sourceware.org/gdb/current/onlinedocs/gdb/Xmethods-In-Python.html
>>
>> This feature will be available in GDB starting version 7.8 (which has
>> not yet been released, but has been branched). The attached patch adds
>> xmethods to the classes std::vector and std::unique_ptr. One can of
>> course add xmethods to many other classes, but I am viewing this as
>> the first patch in that series (though not a series yet) to get the
>> basic infrastructure for adding more xmethods in place.
>>
>> Link to v1 posting: https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02339.html
>> Link to v2 posting: https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00002.html
>>
>> ChangeLog
>>
>> 2014-07-25 Siva Chandra Reddy <sivachandra@google.com>
>>
>> * python/libstdcxx/v6/xmethods.py: New file.
>> * testsuite/lib/gdb-test.exp (gdb_version_check_xmethods): New
>> function.
>> (gdb-test): New optional argument LOAD_XMETHODS. Load xmethods
>> python script if LOAD_XMETHODS is true.
>> * testsuite/libstdc++-xmethods/unique_ptr.cc: New file.
>> * testsuite/libstdc++-xmethods/vector.cc: New file.
>> * testsuite/libstdc++-xmethods/xmethods.exp: New file.
>
> N.B. all patches for libstdc++ need to be sent to the libstdc++
> mailing list as well as the gcc-patches list, to ensure the right
> reviewers see them.
>
> It looks like it should be OK, but do you know if the patch works with
> both Python2 and Python3?