From patchwork Thu Sep 22 17:06:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 57920 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D6E56385735F for ; Thu, 22 Sep 2022 17:06:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6E56385735F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663866411; bh=IRqWm/J1LO+tlNeQ8grCFDN7Rhds250vKgp1Xfbo3C8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=nrHeWZNBd0U5XjEoJsHEILsf4M8sXvAMaNFMxYX9v+UoStJhAVhbFx64o0eZ9AhHk ajQIzakRqIe+06U24YNO7LjmqUAMYkC+lYWYdq1OZ9EDgQUsnlX0fRClIy0FQIO++X YwgDQPP/KM0G1yC6pXG43e9VX6gmAiK4TfMDWCxM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 2D18F3858D38; Thu, 22 Sep 2022 17:06:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2D18F3858D38 Received: by mail-ej1-x635.google.com with SMTP id y3so22523335ejc.1; Thu, 22 Sep 2022 10:06:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=IRqWm/J1LO+tlNeQ8grCFDN7Rhds250vKgp1Xfbo3C8=; b=VUvajNtso1qC2KObFexO8qHorH++DwdL5csATeNODA1q4ZW9++56YMylPuQgI32LSb yKpZelDCmWdwKh7bBQneYe9YCLagMt+CYdTXG21z9AE3SQ1PZ6hhQN1rw0ksnhpcYU72 8+t6fj8DOg8BOdYUrqYEdEmhv4J/SeeCN6m6J0ows/OLdy+Om5eAjJhWW1hhJnf6YMjw 7mxURZGZnQ+rE1s+rlwnV1pUsZUgTc9YzYGzzoX4y6FLN7Rd5/j4Lm7ClDd0j3oU9eu5 izw59cLqD09/zY/NZ6mrhYL34U4/sw7nQuOgau56vT59TdVPJN3IiiYcp6Cw+RlV9gmk Vukw== X-Gm-Message-State: ACrzQf1pKIzipRXXCvOCZVDNGL4RpPEe98noR3XGZB9v5Xls+FNRzlgH ayMhiDjI4vE5LEggY6ybKhzC62VMZL4= X-Google-Smtp-Source: AMsMyM4XslFkgCku9/nJHcDnqPtpo8TuhJAOGrjShUJ8Q0xRyAnPTeBvOhrvi6ocrH6pvFW2xTojdw== X-Received: by 2002:a17:907:5c2:b0:77e:def7:65d8 with SMTP id wg2-20020a17090705c200b0077edef765d8mr3720192ejb.487.1663866381332; Thu, 22 Sep 2022 10:06:21 -0700 (PDT) Received: from [10.56.1.33] ([109.190.253.15]) by smtp.googlemail.com with ESMTPSA id ci2-20020a170906c34200b0073d796a1043sm2836346ejb.123.2022.09.22.10.06.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Sep 2022 10:06:20 -0700 (PDT) Message-ID: <0227a2ef-9efa-6bb2-6529-cb38d081f8be@gmail.com> Date: Thu, 22 Sep 2022 19:06:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: fr To: "libstdc++@gcc.gnu.org" Subject: [PATCH][_GLIBCXX_DEBUG][_GLIBCXX_INLINE_VERSION] Add missing printers X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Fran=C3=A7ois_Dumont_via_Gcc-patches?= From: =?utf-8?q?Fran=C3=A7ois_Dumont?= Reply-To: =?utf-8?q?Fran=C3=A7ois_Dumont?= Cc: gcc-patches Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi     This patch fix failures when _GLIBCXX_INLINE_VERSION mode and running: make check-debug RUNTESTFLAGS=prettyprinters.exp     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. Ok to commit ? François diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index 24a6462e496..1e9d0627e9f 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -2036,6 +2036,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.