]> 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)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 18:07:56 +0000 (15:07 -0300)
commitcd92527c2e7cdf7594d6b3b48dd77017888b04f0
treecb93bd50a6ffb65b9bc77b965dc369b15a632dfb
parent74cbd48dcd928de8cc60fae9ca345514f074c58a
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