summaryrefslogtreecommitdiff
path: root/gdb/command.h
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2012-09-17 08:42:14 +0000
committerYao Qi <yao@codesourcery.com>2012-09-17 08:42:14 +0000
commit6fc1c7733ea454110cfcb02be7d9b4b0f12eca91 (patch)
tree21dc5418ed29e2209c93817d94465640b82d124f /gdb/command.h
parent6acef6cd7bfefe89401de1eca7e12e737eb94da6 (diff)
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.
Diffstat (limited to 'gdb/command.h')
-rw-r--r--gdb/command.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/gdb/command.h b/gdb/command.h
index 88895bb04d..b88bd8b7e8 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -77,7 +77,8 @@ typedef enum var_types
/* Like var_uinteger but signed. *VAR is an int. The user can
type 0 to mean "unlimited", which is stored in *VAR as
- INT_MAX. */
+ INT_MAX. The only remaining use of it is the Python API.
+ Don't use it elsewhere. */
var_integer,
/* String which the user enters with escapes (e.g. the user types
@@ -99,6 +100,9 @@ typedef enum var_types
/* ZeroableUnsignedInteger. *VAR is an unsigned int. Zero really
means zero. */
var_zuinteger,
+ /* ZeroableUnsignedInteger with unlimited value. *VAR is an unsigned
+ int, but its range is [0, INT_MAX]. -1 stands for unlimited. */
+ var_zuinteger_unlimited,
/* Enumerated type. Can only have one of the specified values.
*VAR is a char pointer to the name of the element that we
find. */
@@ -354,6 +358,18 @@ extern void add_setshow_zuinteger_cmd (char *name,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
+extern 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);
+
/* Do a "show" command for each thing on a command list. */
extern void cmd_show_list (struct cmd_list_element *, int, char *);