aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-setshow.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-01-23 18:47:46 +0000
committerPedro Alves <palves@redhat.com>2009-01-23 18:47:46 +0000
commit1e8fb9762b0d2c468915815f73d2fadb44543be1 (patch)
treee06f47a274d8a332ed81aec3d10e2653b8b9aa7b /gdb/cli/cli-setshow.c
parent278df34e1203e781f97b32320094e1831f5f9624 (diff)
downloadgdb-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/cli/cli-setshow.c')
-rw-r--r--gdb/cli/cli-setshow.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index be0581d..206a55d 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -232,6 +232,11 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
error_no_arg (_("integer to set it to."));
*(int *) c->var = parse_and_eval_long (arg);
break;
+ case var_zuinteger:
+ if (arg == NULL)
+ error_no_arg (_("integer to set it to."));
+ *(unsigned int *) c->var = parse_and_eval_long (arg);
+ break;
case var_enum:
{
int i;
@@ -351,6 +356,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
break;
}
/* else fall through */
+ case var_zuinteger:
case var_zinteger:
fprintf_filtered (stb->stream, "%u", *(unsigned int *) c->var);
break;