* 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.
This commit is contained in:
Yao Qi 2012-09-17 08:42:14 +00:00
parent 6acef6cd7b
commit 6fc1c7733e
10 changed files with 103 additions and 12 deletions

View file

@ -1965,12 +1965,12 @@ The matching line number is also stored as the value of \"$_\"."));
add_com_alias ("?", "reverse-search", class_files, 0);
}
add_setshow_integer_cmd ("listsize", class_support, &lines_to_list, _("\
add_setshow_zuinteger_unlimited_cmd ("listsize", class_support,
&lines_to_list, _("\
Set number of source lines gdb will list by default."), _("\
Show number of source lines gdb will list by default."), NULL,
NULL,
show_lines_to_list,
&setlist, &showlist);
NULL, show_lines_to_list,
&setlist, &showlist);
add_cmd ("substitute-path", class_files, set_substitute_path_command,
_("\