diff options
author | Luis Machado <lgustavo@codesourcery.com> | 2015-12-09 10:56:27 -0200 |
---|---|---|
committer | Luis Machado <lgustavo@codesourcery.com> | 2015-12-09 11:00:47 -0200 |
commit | 1c35a88f1d8399902c08a8334d3e3303df833538 (patch) | |
tree | 3af0415ca8e6fbba2286b1af0e4ede79543c5bfc /gdb/doc | |
parent | ec892a0718dc47c2d009532865c353daa749eaa1 (diff) | |
download | gdb-1c35a88f1d8399902c08a8334d3e3303df833538.zip gdb-1c35a88f1d8399902c08a8334d3e3303df833538.tar.gz gdb-1c35a88f1d8399902c08a8334d3e3303df833538.tar.bz2 |
varobj zero-padded hexadecimal format
This set of patches add support for the zero-padded hexadecimal format for
varobj's, defined as "zero-hexadecimal". We currently only support regular
non-zero-padded hexadecimal.
Talking with IDE developers, they would like to have this option that is
already available to GDB's print/x commands, in the CLI, as 'z'.
gdb/ChangeLog:
2015-12-09 Luis Machado <lgustavo@codesourcery.com>
* 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) <FORMAT_ZHEXADECIMAL>: New enum
field.
* NEWS: Add new note to MI changes citing the new zero-hexadecimal
format for -var-set-format.
gdb/doc/ChangeLog:
2015-12-09 Luis Machado <lgustavo@codesourcery.com>
* gdb.texinfo (GDB/MI Variable Objects): Update text to mention
-var-set-format's new zero-hexadecimal format.
gdb/testsuite/ChangeLog:
2015-12-09 Luis Machado <lgustavo@codesourcery.com>
* gdb.mi/mi-var-display.exp: Add new checks for the zero-hexadecimal
format and change test names to make them unique.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 6f05e36..7b0dc35 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2015-12-09 Luis Machado <lgustavo@codesourcery.com> + + * gdb.texinfo (GDB/MI Variable Objects): Update text to mention + -var-set-format's new zero-hexadecimal format. + 2015-12-08 Pierre-Marie de Rodat <derodat@adacore.com> * gdb.texinfo (Ada Mode Into): Move overloading support diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 9f72c52..be39f1c 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -28980,13 +28980,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. |