This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v2 3/3] Documentation changes for the new zero-hexadecimal format
- From: Luis Machado <lgustavo at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Thu, 7 May 2015 14:36:47 -0300
- Subject: [PATCH v2 3/3] Documentation changes for the new zero-hexadecimal format
- Authentication-results: sourceware.org; auth=none
- References: <1431020207-14371-1-git-send-email-lgustavo at codesourcery dot com>
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 <lgustavo@codesourcery.com>
* NEWS: Add new note to MI changes.
gdb/doc/ChangeLog:
2015-05-07 Luis Machado <lgustavo@codesourcery.com>
* 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.
--
1.9.1