PR libstdc++/80276 fix template argument handling in type printers
commitd4f6ff2aedc0cffbf1878e9990c76843faeb0cd9
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Jan 2018 11:13:53 +0000 (15 11:13 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Jan 2018 11:13:53 +0000 (15 11:13 +0000)
treebfb765317e9e4e7b23107ed6cca7d135c09afa29
parente2d48c4c4db14c29cdf7bf409757a92d77cf04e6
PR libstdc++/80276 fix template argument handling in type printers

PR libstdc++/80276
* python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
(get_template_arg_list): New.
(StdVariantPrinter._template_args): Remove, use get_template_arg_list
instead.
(TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
of strings and regular expressions.
(add_one_template_type_printer): Adapt to new TemplateTypePrinter.
(FilteringTypePrinter): Add docstring. Match using startswith. Use
strip_inline_namespaces instead of strip_versioned_namespace.
(add_one_type_printer): Prepend namespace to match argument.
(register_type_printers): Add type printers for char16_t and char32_t
string types and for types using cxx11 ABI. Update calls to
add_one_template_type_printer to provide default argument dicts.
* testsuite/libstdc++-prettyprinters/80276.cc: New test.
* testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
basic_string<unsigned char> and basic_string<signed char>.
* testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256689 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/testsuite/libstdc++-prettyprinters/80276.cc [new file with mode: 0644]
libstdc++-v3/testsuite/libstdc++-prettyprinters/whatis.cc
libstdc++-v3/testsuite/libstdc++-prettyprinters/whatis2.cc [copied from libstdc++-v3/testsuite/libstdc++-prettyprinters/whatis.cc with 66% similarity]