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.