From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11824 invoked by alias); 20 May 2010 19:53:22 -0000 Received: (qmail 11815 invoked by uid 22791); 20 May 2010 19:53:21 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 May 2010 19:53:17 +0000 Received: from hpaq7.eem.corp.google.com (hpaq7.eem.corp.google.com [172.25.149.7]) by smtp-out.google.com with ESMTP id o4KJrEef016198 for ; Thu, 20 May 2010 12:53:15 -0700 Received: from pxi1 (pxi1.prod.google.com [10.243.27.1]) by hpaq7.eem.corp.google.com with ESMTP id o4KJrDaM003516 for ; Thu, 20 May 2010 12:53:13 -0700 Received: by pxi1 with SMTP id 1so92326pxi.36 for ; Thu, 20 May 2010 12:53:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.248.13 with SMTP id v13mr422261rvh.25.1274385192725; Thu, 20 May 2010 12:53:12 -0700 (PDT) Received: by 10.140.255.14 with HTTP; Thu, 20 May 2010 12:53:12 -0700 (PDT) In-Reply-To: <20100520071212.E4A8484398@ruffy.mtv.corp.google.com> References: <20100520071212.E4A8484398@ruffy.mtv.corp.google.com> Date: Thu, 20 May 2010 19:57:00 -0000 Message-ID: Subject: Re: [RFA] add support for disabling individual pretty-printers From: Doug Evans To: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00443.txt.bz2 On Thu, May 20, 2010 at 12:12 AM, Doug Evans wrote: > The approach below uses the presence of an "enabled" attribute > on the lookup function (or callable object!) to control the > enabling/disabling. Of course, it may be sufficient to just turn `print-stack' off. GDB currently doesn't print anything when it's off - it should probably print some (minimal) error message. There's also the issue of wanting to install a different pretty printer for a value (e.g. a fixed or development version). That can be done by inserting the new lookup-function into the head of the right pretty-printer list. Is that preferable to disabling the printer-being-replaced? I don't know. I think it would be useful to be able to list all the installed pretty-printers - once I had that it was easy to provide a way to disable/enable them - but if you don't want to go this route, fine.