This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[patch libstdc++] Add xmethods for std::vector and std::unique_ptr


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.

ChangeLog

libstdc++-v3/

2014-06-29  Siva Chandra Reddy  <sivachandra@google.com>

        * python/hook.in: Register libstdcxx xmethods.
        * 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.

Attachment: libstdcxx-xmethods-v1.txt
Description: Text document


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