summaryrefslogtreecommitdiff
path: root/libstdc++-v3/python/libstdcxx/v6/xmethods.py
AgeCommit message (Collapse)Author
2017-01-10Make Python printers and xmethods work with versioned namespaceredi
2017-01-10 François Dumont <fdumont@gcc.gnu.org> Jonathan Wakely <jwakely@redhat.com> * python/libstdcxx/v6/printers.py (_versioned_namespace): Define. (is_specialization, strip_versioned_namespace): New helpers functions to work with symbols in the versioned namespace. (Printer.add_version): Add second name using versioned namespace. (add_one_template_type_printer, add_one_type_printer): Add second type printers using versioned namespace. (register_type_printers): Add template type printer for basic_string. (build_libstdcxx_dictionary): Remove dead code. * python/libstdcxx/v6/xmethods.py: Make all matchers look for versioned namespace. * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected results. * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244262 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-01 Update copyright years.jakub
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243994 138bc75d-0d04-0410-961f-82ee72b054a4
2016-12-15Add GDB XMethods for shared_ptr and unique_ptr<T[]>redi
* python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__init__): Use correct element type for unique_ptr<T[]>. (UniquePtrGetWorker._supports, UniquePtrDerefWorker._supports): New functions to disable unsupported operators for unique_ptr<T[]>. (UniquePtrSubscriptWorker): New worker for operator[]. (UniquePtrMethodsMatcher.__init__): Register UniquePtrSubscriptWorker. (UniquePtrMethodsMatcher.match): Call _supports on the chosen worker. (SharedPtrGetWorker, SharedPtrDerefWorker, SharedPtrSubscriptWorker) (SharedPtrUseCountWorker, SharedPtrUniqueWorker): New workers. (SharedPtrMethodsMatcher): New matcher for shared_ptr. (register_libstdcxx_xmethods): Register SharedPtrMethodsMatcher. * testsuite/libstdc++-xmethods/unique_ptr.cc: Test arrays. * testsuite/libstdc++-xmethods/shared_ptr.cc: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243688 138bc75d-0d04-0410-961f-82ee72b054a4
2016-10-19PR77990 refactor unique_ptr to encapsulate tupleredi
PR libstdc++/77990 * include/bits/unique_ptr.h (__uniq_ptr_impl): New type to encapsulate implementation details. (unique_ptr::unique_ptr(_Up)): Don't copy deleter object. (unique_ptr::get, unique_ptr::get_deleter, unique_ptr::release): Call member functions of implementation object. (unique_ptr<T[], D>): Likewise. * python/libstdcxx/v6/printers.py (UniquePointerPrinter): Adjust for new implementation. * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker): Likewise. * testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust dg-error lines. * testsuite/20_util/unique_ptr/assign/cv_qual.cc: Likewise. * testsuite/20_util/unique_ptr/cons/cv_qual.cc: Likewise. * testsuite/20_util/unique_ptr/cons/77990.cc: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241330 138bc75d-0d04-0410-961f-82ee72b054a4
2016-10-11Enable printers and xmethods for std::__cxx11::listredi
* python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary): Register printer for std::__cxx11::list. * python/libstdcxx/v6/xmethods.py (ListMethodsMatcher.match): Match std::__cxx11::list as well as std::list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240982 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-20Replace casts with floordiv operator in Python xmethodsredi
* python/libstdcxx/v6/xmethods.py (DequeWorkerBase.__init__) (DequeWorkerBase.index, VectorWorkerBase.get): Use // for division. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240258 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-19libstdc++/77645 fix deque and vector xmethods for Python 3redi
PR libstdc++/77645 * python/libstdcxx/v6/xmethods.py (DequeWorkerBase.__init__) (DequeWorkerBase.index, VectorWorkerBase.get): Cast results of division to int to work with Python 3. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240241 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-19libstdc++/77645 Fix xmethods for std::listredi
PR libstdc++/77645 * python/libstdcxx/v6/xmethods.py (DequeWorkerBase.index): Rename argument. (ListWorkerBase.get_value_from_node): Define new method. (ListFrontWorker.__call__, ListBackWorker.__call__): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240233 138bc75d-0d04-0410-961f-82ee72b054a4
2016-01-04 Update copyright years.jakub
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232055 138bc75d-0d04-0410-961f-82ee72b054a4
2015-05-26 * python/libstdcxx/v6/xmethods.py (UniquePtrMethodsMatcher): Adddevans
operator-> support. * testsuite/libstdc++-xmethods/unique_ptr.cc: Add tests for operator->. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223723 138bc75d-0d04-0410-961f-82ee72b054a4
2015-04-29 PR libstdc++/65839devans
* python/libstdcxx/v6/xmethods.py (get_bool_type): New function. Replace all lookups of "bool" with this. (get_std_size_type): New function. Replace all lookups of std::size_t with this. (*Worker): New method get_result_type. (DequeWorkerBase.__init__): New arg val_type. All callers updated. (ListWorkerBase.__init__): New arg val_type. All callers updated. (UniquePtrGetWorker.__init__): New arg elem_type. All callers updated. Delete setting of name, enabled. (UniquePtrDerefWorker.__init__): New arg elem_type. All callers updated. Delete setting of name. (UniquePtrMethodsMatcher): Rewrite for consistency with all other libstdc++ xmethod matchers. * testsuite/libstdc++-xmethods/array.cc: Add whatis tests. * testsuite/libstdc++-xmethods/associative-containers.cc: Ditto. * testsuite/libstdc++-xmethods/deque.cc: Ditto. * testsuite/libstdc++-xmethods/forwardlist.cc: Ditto. * testsuite/libstdc++-xmethods/list.cc: Ditto. * testsuite/libstdc++-xmethods/unique_ptr.cc: Ditto. * testsuite/libstdc++-xmethods/vector.cc: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222599 138bc75d-0d04-0410-961f-82ee72b054a4
2015-04-29 Use consistent naming for value type attributes.devans
* python/libstdcxx/v6/xmethods.py (ArrayWorkerBase): Rename _valtype to _val_type. (ArraySizeWorker, ArrayEmptyWorker): Ditto. (ArrayFrontWorker, ArrayBackWorker): Ditto. (ArrayAtWorker, ArraySubscriptWorker): Ditto. (DequeWorkerBase): Rename elemtype to val_type. (ForwardListWorkerBase): Rename _elem_type to _val_type. (ForwardListFrontWorker): Ditto. And rename elem_address to val_address. (ForwardListMethodsMatcher): Rename elem_type to val_type. (VectorWorkerBase): Rename _elemtype to _val_type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222596 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-05 Update copyright years.jakub
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219188 138bc75d-0d04-0410-961f-82ee72b054a4
2014-11-112014-11-11 Siva Chandra Reddy <sivachandra@google.com>redi
* python/libstdcxx/v6/xmethods.py: Add xmethods for associative containers. * testsuite/libstdc++-xmethods/associative-containers.cc: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217344 138bc75d-0d04-0410-961f-82ee72b054a4
2014-10-132014-10-13 Siva Chandra Reddy <sivachandra@google.com>redi
* python/libstdcxx/v6/xmethods.py: Add xmethods for std::array, std::deque, std::forward_list, std::list, std::vector. * testsuite/libstdc++-xmethods/array.cc: New file. * testsuite/libstdc++-xmethods/deque.cc: Likewise. * testsuite/libstdc++-xmethods/forwardlist.cc: Likewise. * testsuite/libstdc++-xmethods/list.cc: Likewise. * testsuite/libstdc++-xmethods/vector.cc: Add tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216145 138bc75d-0d04-0410-961f-82ee72b054a4
2014-09-102014-09-10 Siva Chandra Reddy <sivachandra@google.com>redi
* python/hook.in: Load the xmethods. * python/Makefile.am (nobase_python_DATA): Add xmethods.py. * python/Makefile.in: Regenerated. * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215128 138bc75d-0d04-0410-961f-82ee72b054a4