diff options
author | unknown <msvensson@shellback.(none)> | 2006-04-05 10:08:38 +0200 |
---|---|---|
committer | unknown <msvensson@shellback.(none)> | 2006-04-05 10:08:38 +0200 |
commit | 0e97b724b6cd5d5555518feb69d86d03978307f3 (patch) | |
tree | d01a02baf34f45f6d2be13c6fc81c03e4a2fbb73 /mysql-test/mysql-test-run.pl | |
parent | 0a2cd4bb9f14c0e49b536063e304d9c9934f48a9 (diff) | |
parent | a1c46189b88158bdabfa864c9a62a41b21e7f0c2 (diff) | |
download | mariadb-git-0e97b724b6cd5d5555518feb69d86d03978307f3.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into shellback.(none):/home/msvensson/mysql/mysql-5.0
mysql-test/mysql-test-run.pl:
Auto merged
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 55 |
1 files changed, 53 insertions, 2 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 9960aa2d47a..c57e6faba7b 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -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; @@ -603,6 +605,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, @@ -785,9 +789,10 @@ 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 + # Indicate that we are using debugger $glob_debugger= 1; # Increase timeouts $opt_wait_timeout= 300; @@ -2567,6 +2572,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" . @@ -3063,6 +3072,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) { @@ -3215,6 +3228,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 # @@ -3322,6 +3371,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 |