From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80239 invoked by alias); 8 May 2015 17:28:35 -0000 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 Received: (qmail 80229 invoked by uid 89); 8 May 2015 17:28:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 08 May 2015 17:28:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E5321287E3; Fri, 8 May 2015 13:28:31 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MXjHifRY6CnE; Fri, 8 May 2015 13:28:31 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B6F39287AB; Fri, 8 May 2015 13:28:31 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 5ACA240DAA; Fri, 8 May 2015 10:28:31 -0700 (PDT) Date: Fri, 08 May 2015 17:28:00 -0000 From: Joel Brobecker To: Luis Machado Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2 1/3] Add zero-padded hexadecimal format support for varobj's Message-ID: <20150508172831.GC4767@adacore.com> References: <1431020207-14371-1-git-send-email-lgustavo@codesourcery.com> <1431020207-14371-2-git-send-email-lgustavo@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431020207-14371-2-git-send-email-lgustavo@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-05/txt/msg00212.txt.bz2 > gdb/ChangeLog: > > 2015-05-07 Luis Machado > > * gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new "zero-hexadecimal" > format. > * gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal" entry. > (format_code): Add 'z' entry. > (varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL. > * gdb/varobj.h (varobj_display_formats) : New enum > field. I don't normally have authority to approve, but the patch looks sufficiently mechanical that I think I can provide approval if the area maintainer isn't available. In the meantime, I noticed a few nits (formatting, mostly). > error (_("Must specify the format as: \"natural\", " > - "\"binary\", \"decimal\", \"hexadecimal\", or \"octal\"")); > + "\"binary\", \"decimal\", \"hexadecimal\", \"octal\" or \"zero-hexadecimal\"")); The last line is too long. Can you split it? > @@ -50,7 +50,7 @@ show_varobjdebug (struct ui_file *file, int from_tty, > > /* String representations of gdb's format codes. */ > char *varobj_format_string[] = > - { "natural", "binary", "decimal", "hexadecimal", "octal" }; > + { "natural", "binary", "decimal", "hexadecimal", "octal", "zero-hexadecimal" }; Same here. > --- a/gdb/varobj.h > +++ b/gdb/varobj.h > @@ -28,7 +28,8 @@ enum varobj_display_formats > FORMAT_BINARY, /* Binary display */ > FORMAT_DECIMAL, /* Decimal display */ > FORMAT_HEXADECIMAL, /* Hex display */ > - FORMAT_OCTAL /* Octal display */ > + FORMAT_OCTAL, /* Octal display */ > + FORMAT_ZHEXADECIMAL /* Zero padded hexadecimal */ > }; I suggest adding a ',' at the end of FORMAT_ZHEXADECIMAL. That way, next time we add a new enum, we can just add it without touching the rest of the definition. -- Joel