binutils-gdb/gdb/testsuite/gdb.trace
Pedro Alves f81d112039 Accept "set foo unlimited" in integer/uinteger/zuinteger_unlimited commands.
Currently, several commands take "0" or "-1" to mean "unlimited".

"show" knows when to print "unlimited":

 (gdb) show height
 Number of lines gdb thinks are in a page is 45.
 (gdb) set height 0
 (gdb) show height
 Number of lines gdb thinks are in a page is unlimited.

However, the user can't herself specify "unlimited" directly:

 (gdb) set height unlimited
 No symbol table is loaded.  Use the "file" command.
 (gdb)

This patch addresses that, by adjusting the set handler for all
integer/uinteger/zuinteger_unlimited commands to accept literal
"unlimited".  It also installs a completer.  Presently, we complete on
symbols by default, and at
<http://sourceware.org/ml/gdb-patches/2013-03/msg00864.html> I've
shown a WIP prototype that tried to keep that half working in these
commands.  In the end, it turned out to be more complicated than
justifiable, IMO.  It's super rare to want to pass the value of a
variable/symbol in the program to a GDB set/show knob.  That'll still
work, it's just that we won't assist with completion anymore.  This
patch just sticks with the simple, and completes on "unlimited", and
nothing else.  This simplification means that

  "set he<tab><tab>"

is all it takes to get to:

  "set height unlimited"

The patch then goes through all integer/uinteger/zuinteger_unlimited
commands in the tree, and updates both the online help and the manual
to mention that "unlimited" is accepted in addition to 0/-1.  In the
cases where the command had no online help text at all, this adds it.
I've tried to make the texts read in a way that "unlimited" is
suggested before "0" or "-1" is.

Tested on x86_64 Fedora 17.

gdb/
2013-04-10  Pedro Alves  <palves@redhat.com>

	* cli/cli-decode.c (integer_unlimited_completer): New function.
	(add_setshow_integer_cmd, add_setshow_uinteger_cmd)
	(add_setshow_zuinteger_unlimited_cmd): Install the "unlimited"
	completer.
	* cli/cli-setshow.c: Include "cli/cli-utils.h".
	(is_unlimited_literal): New function.
	(do_set_command): Handle literal "unlimited" arguments.
	* frame.c (_initialize_frame) <set backtrace limit>: Document
	"unlimited".
	* printcmd.c (_initialize_printcmd) <set print
	max-symbolic-offset>: Add help text.
	* record-full.c (_initialize_record_full) <set record full
	insn-number-max>: Likewise.
	* record.c (_initialize_record) <set record
	instruction-history-size, set record function-call-history-size>:
	Add help text.
	* ser-tcp.c (_initialize_ser_tcp) <set tcp connect-timeout>: Add
	help text.
	* tracepoint.c (_initialize_tracepoint) <set trace-buffer-size>:
	Likewise.
	* source.c (_initialize_source) <set listsize>: Add help text.
	* utils.c (initialize_utils) <set height, set width>: Likewise.
	<set pagination>: Mention "set height unlimited".
	* valprint.c (_initialize_valprint) <set print elements, set print
	repeats>: Document "unlimited".

gdb/doc/
2013-04-10  Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (Process Record and Replay): Document that "set
	record full insn-number-max", "set record
	instruction-history-size" and "set record
	function-call-history-size" accept "unlimited".
	(Backtrace): Document that "set backtrace limit" accepts
	"unlimited".
	(List): Document that "set listsize" accepts "unlimited".
	(Print Settings)" Document that "set print max-symbolic-offset",
	"set print elements" and "set print repeats" accept "unlimited".
	(Starting and Stopping Trace Experiments): Document that "set
	trace-buffer-size" accepts "unlimited".
	(Remote Configuration): Document that "set tcp connect-timeout"
	accepts "unlimited".
	(Command History): Document that "set history size" accepts
	"unlimited".
	(Screen Size): Document that "set height" and "set width" accepts
	"unlimited".  Adjust "set pagination"'s description to suggest
	"set height unlimited" instead of "set height 0".

gdb/testsuite/
2013-04-10  Pedro Alves  <palves@redhat.com>

	* gdb.base/completion.exp: Test "set height", "set listsize" and
	"set trace-buffer-size" completion.
	* gdb.base/setshow.exp: Test "set height unlimited".
	* gdb.trace/trace-buffer-size.exp: Test "set trace-buffer-size
	unlimited".
2013-04-10 15:11:12 +00:00
..
Makefile.in tracepoint->step_count fixes 2013-04-04 19:22:38 +00:00
actions-changed.c tracepoint->step_count fixes 2013-04-04 19:22:38 +00:00
actions-changed.exp tracepoint->step_count fixes 2013-04-04 19:22:38 +00:00
actions.c gdb/testsuite/ 2013-03-26 12:46:24 +00:00
actions.exp gdb/ 2013-04-10 09:42:57 +00:00
ax.exp Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
backtrace.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
change-loc-1.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
change-loc-2.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
change-loc.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
change-loc.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
change-loc.h Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
circ.c gdb/testsuite/ 2013-03-26 12:46:24 +00:00
circ.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
collection.c gdb/testsuite/ 2013-03-26 12:46:24 +00:00
collection.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
deltrace.exp Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
disconnected-tracing.c gdb/gdbserver: 2013-01-18 06:40:58 +00:00
disconnected-tracing.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
ftrace.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
ftrace.exp Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
infotrace.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
mi-traceframe-changed.exp gdb/testsuite/ 2013-04-03 10:11:46 +00:00
mi-tracepoint-changed.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
mi-tsv-changed.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
packetlen.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
passc-dyn.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
passcount.exp Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
pending.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
pending.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
pendshr1.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
pendshr2.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
report.exp gdb/ 2013-04-10 09:42:57 +00:00
save-trace.exp Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
stap-trace.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
stap-trace.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
status-stop.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
status-stop.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
strace.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
strace.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
tfile.c gdb/testsuite/ 2013-04-03 03:43:54 +00:00
tfile.exp gdb/testsuite/ 2013-04-03 03:43:54 +00:00
tfind.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
trace-break.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
trace-break.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
trace-buffer-size.c 2012-03-08 Stan Shebs <stan@codesourcery.com> 2013-03-08 15:06:39 +00:00
trace-buffer-size.exp Accept "set foo unlimited" in integer/uinteger/zuinteger_unlimited commands. 2013-04-10 15:11:12 +00:00
trace-mt.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
trace-mt.exp Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
tracecmd.exp Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
tspeed.c Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
tspeed.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
tstatus.exp gdb/ 2013-04-10 09:42:57 +00:00
tsv.exp gdb/ 2013-04-10 09:42:57 +00:00
unavailable.cc Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
unavailable.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
while-dyn.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
while-stepping.exp gdb/ 2013-04-10 09:42:57 +00:00