From 13337ea9a1ccffc7d73a8ff87f5f186fd4d0d51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Dumont?= <fdumont@gcc.gnu.org> Date: Thu, 22 Sep 2022 06:58:48 +0200 Subject: [PATCH] libstdc++: [_GLIBCXX_INLINE_VERSION] Add gdb pretty print for _GLIBCXX_DEBUG 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index 5a3dcbd13f98..245b6e3dbcd3 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -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. -- GitLab