binutils-gdb/gdb/cli
Andrew Burgess a0def019aa gdb: 'list' command, tweak handling of +/- arguments.
There is an inconsistency with the handling of the special +/- arguments
to the list command.

For the very first time that list is used (after the inferior has
changed locations) then only the first character of the argument string
is checked, so 'list +BLAH' will operate as 'list +' and 'list -----FOO'
will operate as 'list -'.  This compares to each subsequent use of list,
where the whole argument string is checked, so 'list +BLAH' will try to
list lines of code around the function '+BLAH'.

This commit unifies the behaviour so that the whole argument string is
checked, in order to list the next 10, or previous 10 lines from a file
only 'list +' and 'list -' are now valid.

gdb/ChangeLog:

	* cli/cli-cmds.c (list_command): Check that the argument string is
	a single character, either '+' or '-'.

gdb/testsuite/ChangeLog:

	* gdb.base/list.exp (test_list_invalid_args): New function,
	defined, and called.
2015-12-11 23:05:35 +00:00
..
cli-cmds.c gdb: 'list' command, tweak handling of +/- arguments. 2015-12-11 23:05:35 +00:00
cli-cmds.h
cli-decode.c gdb: Use class_info when creating info commands. 2015-11-11 09:03:25 +00:00
cli-decode.h
cli-dump.c
cli-interp.c
cli-logging.c
cli-script.c
cli-script.h
cli-setshow.c cli-setshow.c: Constify variable 2015-10-24 22:29:16 -04:00
cli-setshow.h
cli-utils.c
cli-utils.h