r245478 - in /branches/gcc-6-branch/libstdc++-v...
redi@gcc.gnu.org
redi@gcc.gnu.org
Wed Feb 15 13:38:00 GMT 2017
Author: redi
Date: Wed Feb 15 13:38:32 2017
New Revision: 245478
URL: https://gcc.gnu.org/viewcvs?rev=245478&root=gcc&view=rev
Log:
Add GDB XMethods for shared_ptr and unique_ptr<T[]>
Backport from mainline
2016-12-15 Jonathan Wakely <jwakely@redhat.com>
* 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.
Added:
branches/gcc-6-branch/libstdc++-v3/testsuite/libstdc++-xmethods/shared_ptr.cc
- copied, changed from r245473, branches/gcc-6-branch/libstdc++-v3/testsuite/libstdc++-xmethods/unique_ptr.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/python/libstdcxx/v6/xmethods.py
branches/gcc-6-branch/libstdc++-v3/testsuite/libstdc++-xmethods/unique_ptr.cc
More information about the Libstdc++-cvs
mailing list