gdbserver: better handling for missing argument values
By passing ':' within the optstring to getopt_long, the getopt_long
call will now return ':' for missing value errors and '?' for unknown
argument errors, rather than returning '?' for all error types.
We can now print a different error message for missing argument
values. For example:
$ gdbserver --debug-file :54321 /tmp/hello
Missing argument value for: --debug-file
Compared to:
$ gdbserver --unknown :54321 ~/tmp/hello.x
Unknown argument: --unknown
Current HEAD gdbserver treats every error as the 'Unknown argument'
error.
While I was messing with the code that prints these error messages,
I've wrapped then with _(...) to allow for internationalisation.
Approved-By: Tom Tromey <tom@tromey.com>
2 files changed