From 1e8fb9762b0d2c468915815f73d2fadb44543be1 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 23 Jan 2009 18:47:46 +0000 Subject: 2009-01-23 Pedro Alves * cli/cli-decode.c (add_setshow_zuinteger_cmd): New. * cli/cli-setshow.c (do_setshow_command): Handle it. * command.h (enum var_types): Add var_zuinteger. (add_setshow_zuinteger_cmd): Declare. * valprint.c (_initialize_valprint): Change the set input-radix and set output-radix commands to zuinteger type. 2009-01-23 Pedro Alves * gdb.base/radix.exp: Add tests to ensure that that set input-radix 0 and set output-radix 0 are really rejected. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/radix.exp | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 49390752ac..4e60fa0454 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-01-23 Pedro Alves + + * gdb.base/radix.exp: Add tests to ensure that that set + input-radix 0 and set output-radix 0 are really rejected. + 2009-01-23 Pedro Alves * gdb.base/hook-stop-frame.c, gdb.base/hook-stop-frame.exp: Update diff --git a/gdb/testsuite/gdb.base/radix.exp b/gdb/testsuite/gdb.base/radix.exp index 172e40f151..750fd234a3 100644 --- a/gdb/testsuite/gdb.base/radix.exp +++ b/gdb/testsuite/gdb.base/radix.exp @@ -162,19 +162,32 @@ gdb_test "set radix" \ "Input and output radices now set to decimal 10, hex a, octal 12\." \ "Reset radices" +gdb_test "set input-radix 0" \ + "Nonsense input radix ``decimal 0''; input radix unchanged\\." \ + "Reject input-radix 0" +gdb_test "show input-radix" \ + "Default input radix for entering numbers is 10\\." \ + "Input radix unchanged after rejecting 0" + gdb_test "set input-radix 1" \ "Nonsense input radix ``decimal 1''; input radix unchanged\\." \ "Reject input-radix 1" gdb_test "show input-radix" \ "Default input radix for entering numbers is 10\\." \ - "Input radix unchanged after rejection" + "Input radix unchanged after rejecting 1" +gdb_test "set output-radix 0" \ + "Unsupported output radix ``decimal 0''; output radix unchanged\\." \ + "Reject output-radix 0" +gdb_test "show output-radix" \ + "Default output radix for printing of values is 10\\." \ + "Output radix unchanged after rejecting 0" gdb_test "set output-radix 1" \ "Unsupported output radix ``decimal 1''; output radix unchanged\\." \ "Reject output-radix 1" gdb_test "show output-radix" \ "Default output radix for printing of values is 10\\." \ - "Output radix unchanged after rejection" + "Output radix unchanged after rejecting 1" gdb_test "set radix 7" \ "Unsupported output radix ``decimal 7''; output radix unchanged\\." \ -- cgit v1.2.1