public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [committed] libstdc++: Add pretty printer for std::error_code and std::error_condition
Date: Tue, 17 Aug 2021 14:33:58 +0100	[thread overview]
Message-ID: <CACb0b4n+5mPW8WDxNZUE=PxZQBhFbHUvxKaBMeoNyo5Ee0_7ZQ@mail.gmail.com> (raw)
In-Reply-To: <YRu5Dac8qLTZM8QE@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

On Tue, 17 Aug 2021 at 14:27, Jonathan Wakely wrote:
>
> Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
>
> libstdc++-v3/ChangeLog:
>
>         * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Define.
>         (build_libstdcxx_dictionary): Register printer for
>         std::error_code and std::error_condition.
>         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test it.
>
> Tested powerpc64le-linux. Committed to trunk.

Oops, that patch included a std::error_category printer which doesn't
work, and wasn't supposed to be committed. Remove with this patch.

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1367 bytes --]

commit 8ea0fadc1b39bded236a7eebd1bae78f0443875a
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Aug 17 14:29:53 2021

    libstdc++: Remove pretty printer committed by mistake
    
    The std::error_category printer wasn't meant to be part of the commit
    adding std::error_code and std::error_condition printers.
    
    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
    
    libstdc++-v3/ChangeLog:
    
            * python/libstdcxx/v6/printers.py (StdErrorCatPrinter): Remove.

diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index e027a69ded9..82d262de8c7 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -1484,18 +1484,6 @@ class StdCmpCatPrinter:
             name = names[int(self.val)]
         return 'std::{}::{}'.format(self.typename, name)
 
-class StdErrorCatPrinter:
-    "Print an object derived from std::error_category"
-
-    def __init__ (self, typename, val):
-        self.val = val
-        self.typename = typename
-
-    def to_string (self):
-        gdb.set_convenience_variable('__cat', self.val)
-        name = gdb.parse_and_eval('$__cat->name()').string()
-        return 'error category = "{}"'.format(name)
-
 class StdErrorCodePrinter:
     "Print a std::error_code or std::error_condition"
 

      reply	other threads:[~2021-08-17 13:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 13:26 Jonathan Wakely
2021-08-17 13:33 ` Jonathan Wakely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACb0b4n+5mPW8WDxNZUE=PxZQBhFbHUvxKaBMeoNyo5Ee0_7ZQ@mail.gmail.com' \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).