gdb: option completion for the 'skip' command

This commit adds proper option completion for the 'skip' command, the
skip_command function (skip.c) has been rewritten as a consequence.
All the existing functionality should have been retained, though some
of the error messages have changed as we now get the errors generated
by the option parsing code rather than the ones from skip_command.

I've added more skip tests to cover error cases that were not
previously tested.  And I've added a test for 'skip FUNCTION_NAME'
which was previously untested.

Consider the -gfile option for the skip command.  Previously the skip
command was hard coded to accept -gfile or -gfi, these were aliases.
But you couldn't pass -gfil.  Now we've switched to the general option
handling routine the only option is -gfile, but our option handling
code will accept any partial option name that uniquely identifies an
option, so -g, -gf, -gfi, -gfil, and -gfile are all valid, and all
aliases of each other.  The same is true for all the options that skip
accepts.

Because of this I've gone through and removed all references to the
short form option names that I can find.  Now that tab-completion
works, there's no need to advertise specific short form names, and as
discussed above, all unique short forms are still valid.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
3 files changed