From 6fc1c7733ea454110cfcb02be7d9b4b0f12eca91 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Mon, 17 Sep 2012 08:42:14 +0000 Subject: gdb/ * cli/cli-decode.c (add_setshow_zuinteger_unlimited_cmd): New. Update comment to add_setshow_integer_cmd. * cli/cli-setshow.c (do_set_command): Handle case 'var_zuinteger_unlimited'. (do_show_command): Likewise. * cli/cli-cmds.c (init_cmds): Call add_setshow_zuinteger_unlimited_cmd for command 'remotetimeout'. * command.h (enum var_types): New zuinteger_unlimited. Update comment to var_integer. * source.c (_initialize_source): Call add_setshow_zuinteger_unlimited_cmd for command 'set listsize'. gdb/doc/ * gdb.texinfo (List): Describe the meaning of 0 and -1 in 'set listsize'. gdb/testsuite/ * gdb.base/list.exp (set_listsize): Don't set arg to "unlimited" when it is less than 0. --- gdb/cli/cli-decode.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'gdb/cli/cli-decode.c') diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 4752a82..6e0f0de 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -632,7 +632,8 @@ add_setshow_optional_filename_cmd (char *name, enum command_class class, /* Add element named NAME to both the set and show command LISTs (the list for set/show or some sublist thereof). CLASS is as in add_cmd. VAR is address of the variable which will contain the - value. SET_DOC and SHOW_DOC are the documentation strings. */ + value. SET_DOC and SHOW_DOC are the documentation strings. This + function is only used in Python API. Please don't use it elsewhere. */ void add_setshow_integer_cmd (char *name, enum command_class class, int *var, @@ -692,6 +693,25 @@ add_setshow_zinteger_cmd (char *name, enum command_class class, NULL, NULL); } +void +add_setshow_zuinteger_unlimited_cmd (char *name, + enum command_class class, + unsigned int *var, + const char *set_doc, + const char *show_doc, + const char *help_doc, + cmd_sfunc_ftype *set_func, + show_value_ftype *show_func, + struct cmd_list_element **set_list, + struct cmd_list_element **show_list) +{ + add_setshow_cmd_full (name, class, var_zuinteger_unlimited, var, + set_doc, show_doc, help_doc, + set_func, show_func, + set_list, show_list, + NULL, NULL); +} + /* Add element named NAME to both the set and show command LISTs (the list for set/show or some sublist thereof). CLASS is as in add_cmd. VAR is address of the variable which will contain the -- cgit v1.1