2018-01-15 Jonathan Wakely <jwakely@redhat.com>
+ * python/libstdcxx/v6/printers.py (register_type_printers): Remove
+ printer for experimental::any. Fix printers for experimental::optional
+ and experimental::basic_string_view.
+
Backport from mainline
2018-01-04 Jonathan Wakely <jwakely@redhat.com>
Recognizes type names that match a regular expression.
Replaces them with a formatted string which can use replacement field
{N} to refer to the \N subgroup of the regex match.
- Type printers are recusively applied to the subgroups.
+ Type printers are recursively applied to the subgroups.
This allows recognizing e.g. "std::vector<(.*), std::allocator<\\1> >"
and replacing it with "std::vector<{1}>", omitting the template argument
# strip the "fundamentals_v1" inline namespace from these types
add_one_template_type_printer(obj, 'optional<T>',
'experimental::fundamentals_v1::optional<(.*)>',
- 'experimental::optional<\\1>')
+ 'experimental::optional<{1}>')
add_one_template_type_printer(obj, 'basic_string_view<C>',
'experimental::fundamentals_v1::basic_string_view<(.*), std::char_traits<\\1> >',
- 'experimental::basic_string_view<\\1>')
+ 'experimental::basic_string_view<{1}>')
def register_libstdcxx_printers (obj):
"Register libstdc++ pretty-printers with objfile Obj."