From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 1ED813888833; Fri, 27 May 2022 17:34:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1ED813888833 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-8427] libstdc++: Fix printing of std::span for versioned namespace X-Act-Checkin: gcc X-Git-Author: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 50712db568cd8c469909a7a05e2c9bb8fe004672 X-Git-Newrev: 2a9c87a204058586e62363dd06144db4b14e7562 Message-Id: <20220527173411.1ED813888833@sourceware.org> Date: Fri, 27 May 2022 17:34:11 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2022 17:34:11 -0000 https://gcc.gnu.org/g:2a9c87a204058586e62363dd06144db4b14e7562 commit r12-8427-g2a9c87a204058586e62363dd06144db4b14e7562 Author: François Dumont Date: Wed May 25 22:05:48 2022 +0200 libstdc++: Fix printing of std::span for versioned namespace libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (StdSpanPrinter.__init__): Strip typename from version namespace. (cherry picked from commit ace4b7f295f407b16cfbc2e359f4ef7cd61d4a46) Diff: --- libstdc++-v3/python/libstdcxx/v6/printers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index 17d5e5b5731..d47f9f27662 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -1688,7 +1688,7 @@ class StdSpanPrinter: return '[%d]' % count, (self.begin + count).dereference() def __init__(self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val if val.type.template_argument(1) == gdb.parse_and_eval('static_cast(-1)'): self.size = val['_M_extent']['_M_extent_value'] @@ -1995,7 +1995,7 @@ class FilteringTypePrinter(object): self.enabled = True class _recognizer(object): - "The recognizer class for TemplateTypePrinter." + "The recognizer class for FilteringTypePrinter." def __init__(self, match, name): self.match = match