From 6fbe845e0c00ca40e98aa23401e0b5490717a646 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 25 Jul 2013 10:16:08 +0000 Subject: Add new 'z' format for print command. http://sourceware.org/ml/gdb-patches/2013-07/msg00235.html gdb/ChangeLog * NEWS: Mention new 'z' formatter. * printcmd.c (print_scalar_formatted): Add new 'z' formatter. (_initialize_printcmd): Mention 'z' formatter in help text of the 'x' command. gdb/doc/ChangeLog * gdb.texinfo (Output Formats): Mention the new 'z' formatter. gdb/testsuite/ChangeLog * gdb.base/printcmds.exp (test_print_int_arrays): Add tests for x, z, o, and t output formats. * gdb.base/display.exp: Use 'k' as an undefined format now that 'z' is defined. --- gdb/doc/ChangeLog | 4 ++++ gdb/doc/gdb.texinfo | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'gdb/doc') diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 87a1f08..3c3c124 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2013-07-25 Andrew Burgess + + * gdb.texinfo (Output Formats): Mention the new 'z' formatter. + 2013-07-17 Doug Evans * gdb.texinfo (Print Settings): Document "print raw frame-arguments". diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 4caeea5..cb393e8 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -8517,6 +8517,11 @@ Without this format, @value{GDBN} displays pointers to and arrays of strings. Single-byte members of a vector are displayed as an integer array. +@item z +Like @samp{x} formatting, the value is treated as an integer and +printed as hexadecimal, but leading zeros are printed to pad the value +to the size of the integer type. + @item r @cindex raw printing Print using the @samp{raw} formatting. By default, @value{GDBN} will -- cgit v1.1