]> git.ipfire.org Git - thirdparty/gcc.git/commit
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, 11 Jan 2021 11:25:18 +0000 (11:25 +0000)
commit01f538671895f2287f36a3e4500055c38e8c8a76
treee93155e7ac26324188566951ec67699d6ffd19ad
parent94a665fcc68c4b48f5ad8acae7e1a49868c94026
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.

(cherry picked from commit ed11f7e84bcae89f486f5023e566726a7faa7dd4)
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/testsuite/libstdc++-prettyprinters/compat.cc