From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1720) id 2CAFC3857354; Thu, 29 Sep 2022 18:42:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2CAFC3857354 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664476970; bh=jLCmKBH+cjvJnUyz81LSqgopfnYB6clwPp4DhBILe18=; h=From:To:Subject:Date:From; b=bxUiRiZfL+udf5En9+XdNTXlL/RMmlNEeTCqgipIbfiMyIGC32yVEp5Kog2hWmu/4 K3FfBIE1Nt71Q9uq8EGD1HW+Bsiy+Ziv1L/htba9ibQUNTQVCkZefN6lDwEdMdetFo QXUqtzqjnz7pF3KKh0ZjRvr+gtgdvoznWFizIHR0= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: =?utf-8?b?RnJhbuCkpeCkiG9pcyBEdW1vbnQ=?= To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-2967] libstdc++: [_GLIBCXX_INLINE_VERSION] Add gdb pretty print for _GLIBCXX_DEBUG X-Act-Checkin: gcc X-Git-Author: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Git-Refname: refs/heads/master X-Git-Oldrev: 61762797bac9cfe2e43d29d0d23ea0d02a9dd685 X-Git-Newrev: 13337ea9a1ccffc7d73a8ff87f5f186fd4d0d51c Message-Id: <20220929184250.2CAFC3857354@sourceware.org> Date: Thu, 29 Sep 2022 18:42:50 +0000 (GMT) List-Id: https://gcc.gnu.org/g:13337ea9a1ccffc7d73a8ff87f5f186fd4d0d51c commit r13-2967-g13337ea9a1ccffc7d73a8ff87f5f186fd4d0d51c Author: François Dumont Date: Thu Sep 22 06:58:48 2022 +0200 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. Diff: --- 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 5a3dcbd13f9..245b6e3dbcd 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.