libstdc++: Fix compatibility support in unique_ptr pretty printer
authorJonathan Wakely <jwakely@redhat.com>
Mon, 10 Aug 2020 17:44:06 +0000 (18:44 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 10 Aug 2020 17:47:06 +0000 (18:47 +0100)
commited11f7e84bcae89f486f5023e566726a7faa7dd4
treec1a9fcb986e61da0284500f5456900d7a7894883
parenta5da50ed65a835dc1ed6179e3f2b6164fd6e4969
libstdc++: Fix compatibility support in unique_ptr pretty printer

The support for the old std::unique_ptr implementation was failing,
because it tried to work on a typedef instead of the underlying type.
The test supposed to verify the support worked wasn't using a typedef,
so didn't notice the problem.

libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
Use gdb.Type.strip_typedefs().
* testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
the emulated old type.
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/testsuite/libstdc++-prettyprinters/compat.cc