aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/printcmds.exp
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2013-07-25 10:16:08 +0000
committerAndrew Burgess <aburgess@broadcom.com>2013-07-25 10:16:08 +0000
commit6fbe845e0c00ca40e98aa23401e0b5490717a646 (patch)
tree6e6cd06893ba6d7525ea00f4922fdc741dc7af62 /gdb/testsuite/gdb.base/printcmds.exp
parentdb6a5d5f908a3139924421da1d80d8edf479646c (diff)
downloadgdb-6fbe845e0c00ca40e98aa23401e0b5490717a646.zip
gdb-6fbe845e0c00ca40e98aa23401e0b5490717a646.tar.gz
gdb-6fbe845e0c00ca40e98aa23401e0b5490717a646.tar.bz2
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.
Diffstat (limited to 'gdb/testsuite/gdb.base/printcmds.exp')
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index 0c06557..4f88382 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -587,6 +587,16 @@ proc test_print_int_arrays {} {
" = {{{0, 1}, {2, 3}, {4, 5}}, {{6, 7}, {8, 9}, {10, 11}}}"
gdb_test_escape_braces "p int4dim" \
" = {{{{0, 1}, {2, 3}, {4, 5}}, {{6, 7}, {8, 9}, {10, 11}}}}"
+
+ # Some checks for various output formats.
+ gdb_test_escape_braces "p/x int4dim" \
+ " = {{{{0x0, 0x1}, {0x2, 0x3}, {0x4, 0x5}}, {{0x6, 0x7}, {0x8, 0x9}, {0xa, 0xb}}}}"
+ gdb_test_escape_braces "p/z int4dim" \
+ " = {{{{0x0+0, 0x0+1}, {0x0+2, 0x0+3}, {0x0+4, 0x0+5}}, {{0x0+6, 0x0+7}, {0x0+8, 0x0+9}, {0x0+a, 0x0+b}}}}"
+ gdb_test_escape_braces "p/o int4dim" \
+ " = {{{{0, 01}, {02, 03}, {04, 05}}, {{06, 07}, {010, 011}, {012, 013}}}}"
+ gdb_test_escape_braces "p/t int4dim" \
+ " = {{{{0, 1}, {10, 11}, {100, 101}}, {{110, 111}, {1000, 1001}, {1010, 1011}}}}"
}
proc test_print_typedef_arrays {} {