Commit 5441bbd3 authored by Sergei Golubchik's avatar Sergei Golubchik

./mtr --gdb testname

Make --gdb to take an optional argument *only* if it's
written after '=', not after a space.

followup for 339b9055
parent 0a1c0a43
...@@ -1133,7 +1133,7 @@ sub command_line_setup { ...@@ -1133,7 +1133,7 @@ sub command_line_setup {
'debug' => \$opt_debug, 'debug' => \$opt_debug,
'debug-common' => \$opt_debug_common, 'debug-common' => \$opt_debug_common,
'debug-server' => \$opt_debug_server, 'debug-server' => \$opt_debug_server,
'gdb:s' => sub { $opt_gdb = $_[1] || '#' }, 'gdb=s' => \$opt_gdb,
'client-gdb' => \$opt_client_gdb, 'client-gdb' => \$opt_client_gdb,
'manual-gdb' => \$opt_manual_gdb, 'manual-gdb' => \$opt_manual_gdb,
'manual-lldb' => \$opt_manual_lldb, 'manual-lldb' => \$opt_manual_lldb,
...@@ -1228,6 +1228,9 @@ sub command_line_setup { ...@@ -1228,6 +1228,9 @@ sub command_line_setup {
'skip-test-list=s' => \@opt_skip_test_list 'skip-test-list=s' => \@opt_skip_test_list
); );
# fix options (that take an optional argument and *only* after = sign
my %fixopt = ( '--gdb' => '--gdb=#' );
@ARGV = map { $fixopt{$_} or $_ } @ARGV;
GetOptions(%options) or usage("Can't read options"); GetOptions(%options) or usage("Can't read options");
usage("") if $opt_usage; usage("") if $opt_usage;
list_options(\%options) if $opt_list_options; list_options(\%options) if $opt_list_options;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment