From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26247 invoked by alias); 10 Jan 2012 21:19:03 -0000 Received: (qmail 26200 invoked by uid 22791); 10 Jan 2012 21:18:53 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Jan 2012 21:18:41 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0ALIfUJ030312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 10 Jan 2012 16:18:41 -0500 Received: from host2.jankratochvil.net (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0ALIblP015685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 10 Jan 2012 16:18:40 -0500 Date: Tue, 10 Jan 2012 21:23:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFC: enum pretty-printing support Message-ID: <20120110211713.GA1550@host2.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-01/txt/msg00317.txt.bz2 On Tue, 10 Jan 2012 20:54:39 +0100, Tom Tromey wrote: > I'd appreciate comments on this patch. There is the obvious question this may work automatically if all the values of enum type are in the form 2^n and fall back to the GDB default way otherwise. Also it would not display parentheses if the variable value is just 2^n. GDB could pass the type as `enum NAME' instead of just `NAME' to the pretty printer regex. Thanks, Jan