Loading mysql-test/mysql-test-run.pl +53 −2 Original line number Diff line number Diff line Loading @@ -227,6 +227,8 @@ our $opt_client_ddd; our $opt_manual_gdb; our $opt_manual_ddd; our $opt_manual_debug; our $opt_debugger; our $opt_client_debugger; our $opt_gprof; our $opt_gprof_dir; Loading Loading @@ -592,6 +594,8 @@ sub command_line_setup () { 'manual-debug' => \$opt_manual_debug, 'ddd' => \$opt_ddd, 'client-ddd' => \$opt_client_ddd, 'debugger=s' => \$opt_debugger, 'client-debugger=s' => \$opt_client_debugger, 'strace-client' => \$opt_strace_client, 'master-binary=s' => \$exe_master_mysqld, 'slave-binary=s' => \$exe_slave_mysqld, Loading Loading @@ -774,7 +778,8 @@ sub command_line_setup () { # Check debug related options if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug) $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug || $opt_debugger || $opt_client_debugger ) { # Indicate that we are using debugger $glob_debugger= 1; Loading Loading @@ -2556,6 +2561,10 @@ sub mysqld_start ($$$$$) { { ddd_arguments(\$args, \$exe, "$type"."_$idx"); } elsif ( $opt_debugger ) { debugger_arguments(\$args, \$exe, "$type"."_$idx"); } elsif ( $opt_manual_debug ) { print "\nStart $type in your debugger\n" . Loading Loading @@ -3052,6 +3061,10 @@ sub run_mysqltest ($) { { ddd_arguments(\$args, \$exe, "client"); } elsif ( $opt_client_debugger ) { debugger_arguments(\$args, \$exe, "client"); } if ($glob_use_libtool and $opt_valgrind) { Loading Loading @@ -3204,6 +3217,42 @@ sub ddd_arguments { mtr_add_arg($$args, "$save_exe"); } # # Modify the exe and args so that program is run in the selected debugger # sub debugger_arguments { my $args= shift; my $exe= shift; my $debugger= $opt_debugger || $opt_client_debugger; if ( $debugger eq "vcexpress" or $debugger eq "vc") { # vc[express] /debugexe exe arg1 .. argn # Add /debugexe and name of the exe before args unshift(@$$args, "/debugexe"); unshift(@$$args, "$$exe"); } elsif ( $debugger eq "windbg" ) { # windbg exe arg1 .. argn # Add name of the exe before args unshift(@$$args, "$$exe"); } else { mtr_error("Unknown argument \"$debugger\" passed to --debugger"); } # Set exe to debuggername $$exe= $debugger; } # # Modify the exe and args so that program is run in valgrind # Loading Loading @@ -3311,6 +3360,8 @@ Options for debugging the product client-gdb Start mysqltest client in gdb ddd Start mysqld in ddd client-ddd Start mysqltest client in ddd debugger=NAME Start mysqld in the selected debugger client-debugger=NAME Start mysqltest in the selected debugger strace-client FIXME master-binary=PATH Specify the master "mysqld" to use slave-binary=PATH Specify the slave "mysqld" to use Loading Loading
mysql-test/mysql-test-run.pl +53 −2 Original line number Diff line number Diff line Loading @@ -227,6 +227,8 @@ our $opt_client_ddd; our $opt_manual_gdb; our $opt_manual_ddd; our $opt_manual_debug; our $opt_debugger; our $opt_client_debugger; our $opt_gprof; our $opt_gprof_dir; Loading Loading @@ -592,6 +594,8 @@ sub command_line_setup () { 'manual-debug' => \$opt_manual_debug, 'ddd' => \$opt_ddd, 'client-ddd' => \$opt_client_ddd, 'debugger=s' => \$opt_debugger, 'client-debugger=s' => \$opt_client_debugger, 'strace-client' => \$opt_strace_client, 'master-binary=s' => \$exe_master_mysqld, 'slave-binary=s' => \$exe_slave_mysqld, Loading Loading @@ -774,7 +778,8 @@ sub command_line_setup () { # Check debug related options if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug) $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug || $opt_debugger || $opt_client_debugger ) { # Indicate that we are using debugger $glob_debugger= 1; Loading Loading @@ -2556,6 +2561,10 @@ sub mysqld_start ($$$$$) { { ddd_arguments(\$args, \$exe, "$type"."_$idx"); } elsif ( $opt_debugger ) { debugger_arguments(\$args, \$exe, "$type"."_$idx"); } elsif ( $opt_manual_debug ) { print "\nStart $type in your debugger\n" . Loading Loading @@ -3052,6 +3061,10 @@ sub run_mysqltest ($) { { ddd_arguments(\$args, \$exe, "client"); } elsif ( $opt_client_debugger ) { debugger_arguments(\$args, \$exe, "client"); } if ($glob_use_libtool and $opt_valgrind) { Loading Loading @@ -3204,6 +3217,42 @@ sub ddd_arguments { mtr_add_arg($$args, "$save_exe"); } # # Modify the exe and args so that program is run in the selected debugger # sub debugger_arguments { my $args= shift; my $exe= shift; my $debugger= $opt_debugger || $opt_client_debugger; if ( $debugger eq "vcexpress" or $debugger eq "vc") { # vc[express] /debugexe exe arg1 .. argn # Add /debugexe and name of the exe before args unshift(@$$args, "/debugexe"); unshift(@$$args, "$$exe"); } elsif ( $debugger eq "windbg" ) { # windbg exe arg1 .. argn # Add name of the exe before args unshift(@$$args, "$$exe"); } else { mtr_error("Unknown argument \"$debugger\" passed to --debugger"); } # Set exe to debuggername $$exe= $debugger; } # # Modify the exe and args so that program is run in valgrind # Loading Loading @@ -3311,6 +3360,8 @@ Options for debugging the product client-gdb Start mysqltest client in gdb ddd Start mysqld in ddd client-ddd Start mysqltest client in ddd debugger=NAME Start mysqld in the selected debugger client-debugger=NAME Start mysqltest in the selected debugger strace-client FIXME master-binary=PATH Specify the master "mysqld" to use slave-binary=PATH Specify the slave "mysqld" to use Loading