diff options
author | Pedro Alves <palves@redhat.com> | 2009-01-23 18:47:46 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-01-23 18:47:46 +0000 |
commit | 1e8fb9762b0d2c468915815f73d2fadb44543be1 (patch) | |
tree | e06f47a274d8a332ed81aec3d10e2653b8b9aa7b /gdb/testsuite | |
parent | 278df34e1203e781f97b32320094e1831f5f9624 (diff) | |
download | gdb-1e8fb9762b0d2c468915815f73d2fadb44543be1.zip gdb-1e8fb9762b0d2c468915815f73d2fadb44543be1.tar.gz gdb-1e8fb9762b0d2c468915815f73d2fadb44543be1.tar.bz2 |
2009-01-23 Pedro Alves <pedro@codesourcery.com>
* 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 <pedro@codesourcery.com>
* gdb.base/radix.exp: Add tests to ensure that that set
input-radix 0 and set output-radix 0 are really rejected.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/radix.exp | 17 |
2 files changed, 20 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4939075..4e60fa0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2009-01-23 Pedro Alves <pedro@codesourcery.com> + * 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 <pedro@codesourcery.com> + * gdb.base/hook-stop-frame.c, gdb.base/hook-stop-frame.exp: Update copyright years. diff --git a/gdb/testsuite/gdb.base/radix.exp b/gdb/testsuite/gdb.base/radix.exp index 172e40f..750fd23 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\\." \ |