From patchwork Thu May 7 17:36:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 6612 Received: (qmail 76778 invoked by alias); 7 May 2015 17:37:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 76667 invoked by uid 89); 7 May 2015 17:37:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 May 2015 17:37:04 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1YqPjI-0006hM-Mg from Luis_Gustavo@mentor.com for gdb-patches@sourceware.org; Thu, 07 May 2015 10:37:00 -0700 Received: from opsys.world.mentorg.com (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.224.2; Thu, 7 May 2015 10:36:59 -0700 From: Luis Machado To: Subject: [PATCH v2 3/3] Documentation changes for the new zero-hexadecimal format Date: Thu, 7 May 2015 14:36:47 -0300 Message-ID: <1431020207-14371-4-git-send-email-lgustavo@codesourcery.com> In-Reply-To: <1431020207-14371-1-git-send-email-lgustavo@codesourcery.com> References: <1431020207-14371-1-git-send-email-lgustavo@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes This patch updates the documentation to reflect the addition of the new zero-hexadecimal format option for -var-set-format and also adds a NEWS entry for the change. I changed it from zhexadecimal to zero-hexadecimal so the IDE folks can properly translate the string to something more reasonable. gdb/ChangeLog: 2015-05-07 Luis Machado * NEWS: Add new note to MI changes. gdb/doc/ChangeLog: 2015-05-07 Luis Machado * gdb.texinfo (GDB/MI Variable Objects): Update text for -var-set-format. --- gdb/NEWS | 6 ++++++ gdb/doc/gdb.texinfo | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gdb/NEWS b/gdb/NEWS index 0c7084a..69a8f19 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -145,6 +145,12 @@ qXfer:exec-file:read HP/PA running HP-UX hppa*-*-hpux* Itanium running HP-UX ia64-*-hpux* +* MI changes + + ** The -var-set-format command now accepts the zero-hexadecimal + format. It outputs data in hexadecimal format with zero-padding on the + left. + *** Changes in GDB 7.9 * GDB now supports hardware watchpoints on x86 GNU Hurd. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 19d8bb3..ef0be3c 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -28927,13 +28927,18 @@ The syntax for the @var{format-spec} is as follows: @smallexample @var{format-spec} @expansion{} - @{binary | decimal | hexadecimal | octal | natural@} + @{binary | decimal | hexadecimal | octal | natural | zero-hexadecimal@} @end smallexample The natural format is the default format choosen automatically based on the variable type (like decimal for an @code{int}, hex for pointers, etc.). +The zero-hexadecimal format has a representation similar to hexadecimal +but with padding zeroes to the left of the value. For example, a 32-bit +hexadecimal value of 0x1234 would be represented as 0x00001234 in the +zero-hexadecimal format. + For a variable with children, the format is set only on the variable itself, and the children are not affected.