]> gcc.gnu.org Git - gcc.git/commitdiff
libstdc++: [_GLIBCXX_INLINE_VERSION] Add gdb pretty print for _GLIBCXX_DEBUG
authorFrançois Dumont <fdumont@gcc.gnu.org>
Thu, 22 Sep 2022 04:58:48 +0000 (06:58 +0200)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Thu, 29 Sep 2022 18:41:37 +0000 (20:41 +0200)
In _GLIBCXX_DEBUG mode containers are in std::__debug namespace but not template
parameters. In _GLIBCXX_INLINE_VERSION mode most types are in std::__8 namespace but
not std::__debug containers. We need to register specific type printers for this
combination.

libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py (add_one_template_type_printer): Register
printer for types in std::__debug namespace with template parameters in std::__8
namespace.

libstdc++-v3/python/libstdcxx/v6/printers.py

index 5a3dcbd13f982badd0aed718458f2245418177a8..245b6e3dbcd3593188d73535e2c878d3290a8eb3 100644 (file)
@@ -2034,6 +2034,10 @@ def add_one_template_type_printer(obj, name, defargs):
         printer = TemplateTypePrinter(ns+name, defargs)
         gdb.types.register_type_printer(obj, printer)
 
+        # Add type printer for same type in debug namespace:
+        printer = TemplateTypePrinter('std::__debug::'+name, defargs)
+        gdb.types.register_type_printer(obj, printer)
+
 class FilteringTypePrinter(object):
     r"""
     A type printer that uses typedef names for common template specializations.
This page took 0.062956 seconds and 5 git commands to generate.