Commit Graph

8 Commits

Author SHA1 Message Date
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Jonathan Wakely 0376e86bfc Add GDB XMethods for shared_ptr and unique_ptr<T[]>
* 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.

From-SVN: r243688
2016-12-15 12:45:42 +00:00
Jonathan Wakely 52066eae5d Use effective-target instead of -std options
* testsuite/*: Use { target c++11 } or { target c++14 } instead of
	using -std in dg-options.

From-SVN: r239777
2016-08-26 12:41:37 +01:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Doug Evans 419587a0bb xmethods.py (UniquePtrMethodsMatcher): Add operator-> support.
* python/libstdcxx/v6/xmethods.py (UniquePtrMethodsMatcher): Add
	operator-> support.
	* testsuite/libstdc++-xmethods/unique_ptr.cc: Add tests for
	operator->.

From-SVN: r223723
2015-05-26 23:06:55 +00:00
Doug Evans 8996b63b09 re PR libstdc++/65839 (xmethods need updating once gdb decides how to fix 18285)
PR libstdc++/65839
	* 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.

From-SVN: r222599
2015-04-29 22:50:31 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Siva Chandra Reddy e9e08827bf hook.in: Load the xmethods.
2014-09-10  Siva Chandra Reddy  <sivachandra@google.com>

	* 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.

From-SVN: r215128
2014-09-10 14:18:04 +01:00