diff options
| author | Jonathan Wakely <jwakely@redhat.com> | 2026-02-04 22:57:34 +0000 |
|---|---|---|
| committer | Jonathan Wakely <redi@gcc.gnu.org> | 2026-02-05 11:52:36 +0000 |
| commit | 2e4e58bb43c5769827cd7c6dde46dd1060740e55 (patch) | |
| tree | 5b63c35ec0f10fa69fa6270161fbfff902bcb998 /libjava/gnu | |
| parent | 1be41ad752945b0ed5c26aa134a30c145a29afd0 (diff) | |
| download | gcc-2e4e58bb43c5769827cd7c6dde46dd1060740e55.zip gcc-2e4e58bb43c5769827cd7c6dde46dd1060740e55.tar.gz gcc-2e4e58bb43c5769827cd7c6dde46dd1060740e55.tar.bz2 | |
libstdc++: Fix std::shared_ptr pretty printer for GDB 11
This pretty printer was updated for GCC 16 to match a change to
std::atomic<shared_ptr<T>>. But the gdb.Type.is_scalar property was
added in GDB 12.1, so we get an error for older GDB versions.
This adds a workaround for older GDB versions. The gdb.Type.tag property
is None for scalar types, and should always be defined for the
std::atomic class template. Another option would be to use the
is_specialization_of function defined in printers.py, but just checking
for the tag is simpler.
libstdc++-v3/ChangeLog:
* python/libstdcxx/v6/printers.py (SharedPointerPrinter): Only
use gdb.Type.is_scalar if supported.
* testsuite/libstdc++-prettyprinters/compat.cc: Test printer for
old implementation of std::atomic<std::shared_ptr<T>>.
Reviewed-by: Tomasz KamiĆski <tkaminsk@redhat.com>
Diffstat (limited to 'libjava/gnu')
0 files changed, 0 insertions, 0 deletions
