libstdc++: Add pretty printer for std::atomic
authorJonathan Wakely <jwakely@redhat.com>
Wed, 27 Apr 2022 13:29:34 +0000 (14:29 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 27 Apr 2022 14:48:32 +0000 (15:48 +0100)
commita849584587c317e47f7581df2181efabb948d08f
tree25e717b9a3eecc1afebb29cbe0aee70ee9967a54
parente07ea03fce26197d31a9654f4ba217e842049d65
libstdc++: Add pretty printer for std::atomic

For the atomic specializations for shared_ptr and weak_ptr we can reuse
the existing SharedPointerPrinter, with a small tweak.

libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py (SharedPointerPrinter): Add
support for atomic<shared_ptr<T>> and atomic<weak_ptr<T>>.
(StdAtomicPrinter): New printer.
(build_libstdcxx_dictionary): Register new printer.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Test std::atomic.
* testsuite/libstdc++-prettyprinters/cxx20.cc: Test atomic smart
pointers.
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx20.cc