Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2100 06/03/23 16:22:56 msvensson@shellback.(none) +1 -0
Add support fo --manual-debug, --manual-gdb and -manual-ddd
Touchups
mysql-test/mysql-test-run.pl
1.80 06/03/23 16:22:50 msvensson@shellback.(none) +56 -22
Add support fo --manual-debug, --manual-gdb and -manual-ddd
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/mysqltestrun_pl/my50-mysqltestrun_pl
--- 1.79/mysql-test/mysql-test-run.pl 2006-03-23 15:30:17 +01:00
+++ 1.80/mysql-test/mysql-test-run.pl 2006-03-23 16:22:50 +01:00
@@ -774,8 +774,8 @@
}
# Check debug related options
- if ( $opt_gdb || $opt_client_gdb || $opt_ddd || opt_client_ddd ||
- $opt_manual_gdb || $opt_manual_ddd || opt_manual_debug)
+ if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
+ $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug)
{
# Indicate that we are using debugger
$glob_debugger= 1;
@@ -1557,7 +1557,7 @@
mtr_print_line();
- if ( ! $opt_debugger and
+ if ( ! $glob_debugger and
! $glob_use_running_server and
! $glob_use_embedded_server )
{
@@ -2494,7 +2494,7 @@
my $args; # Arg vector
my $exe;
- my $pid;
+ my $pid= -1;
if ( $type eq 'master' )
{
@@ -2527,30 +2527,45 @@
{
ddd_arguments(\$args, \$exe, $type);
}
+ elsif ( $opt_manual_debug )
+ {
+ print "\nStart $type in your debugger\n" .
+ "dir: $glob_mysql_test_dir\n" .
+ "exe: $exe\n" .
+ "args: " . join(" ", @$args) . "\n\n" .
+ "Waiting ....\n";
+
+ # Indicate the exe should not be started
+ $exe= undef;
+ }
if ( $type eq 'master' )
{
- if ( $pid= mtr_spawn($exe, $args, "",
- $master->[$idx]->{'path_myerr'},
- $master->[$idx]->{'path_myerr'},
- "",
- { append_log_file => 1 }) )
+ if ( ! defined $exe or
+ $pid= mtr_spawn($exe, $args, "",
+ $master->[$idx]->{'path_myerr'},
+ $master->[$idx]->{'path_myerr'},
+ "",
+ { append_log_file => 1 }) )
{
return sleep_until_file_created($master->[$idx]->{'path_mypid'},
- $master->[$idx]->{'start_timeout'}, $pid);
+ $master->[$idx]->{'start_timeout'},
+ $pid);
}
}
if ( $type eq 'slave' )
{
- if ( $pid= mtr_spawn($exe, $args, "",
+ if ( ! defined $exe or
+ $pid= mtr_spawn($exe, $args, "",
$slave->[$idx]->{'path_myerr'},
$slave->[$idx]->{'path_myerr'},
"",
{ append_log_file => 1 }) )
{
return sleep_until_file_created($slave->[$idx]->{'path_mypid'},
- $master->[$idx]->{'start_timeout'}, $pid);
+ $master->[$idx]->{'start_timeout'},
+ $pid);
}
}
@@ -3012,7 +3027,7 @@
if ($glob_use_libtool)
{
# Add "libtool --mode-execute" before the test to execute
- unshift(@$args, "--mode=execute", $path);
+ unshift(@$args, "--mode=execute", $exe);
$exe= "libtool";
}
@@ -3049,27 +3064,37 @@
{
# write init file for client
mtr_tofile($gdb_init_file,
- "set args $str\n"
- );
+ "set args $str\n" .
+ "break main\n");
}
else
{
# write init file for mysqld
mtr_tofile($gdb_init_file,
- "file $$exe\n" .
"set args $str\n" .
"break mysql_parse\n" .
"commands 1\n" .
"disable 1\n" .
"end\n" .
- "run"
- );
+ "run");
+ }
+
+ if ( $opt_manual_gdb )
+ {
+ print "\nTo start gdb for$type, type in another window:\n";
+ print "cd $glob_mysql_test_dir;\n";
+ print "gdb -x $gdb_init_file $$exe\n";
+
+ # Indicate the exe should not be started
+ $$exe= undef;
+ return;
}
$$args= [];
mtr_add_arg($$args, "-title");
mtr_add_arg($$args, "$type");
mtr_add_arg($$args, "-e");
+
if ( $glob_use_libtool )
{
mtr_add_arg($$args, "libtool");
@@ -3101,8 +3126,7 @@
# write init file for client
mtr_tofile($gdb_init_file,
"set args $str\n" .
- "break main\n"
- );
+ "break main\n");
}
else
{
@@ -3114,8 +3138,18 @@
"commands 1\n" .
"disable 1\n" .
"end\n" .
- "run"
- );
+ "run");
+ }
+
+ if ( $opt_manual_ddd )
+ {
+ print "\nTo start ddd for$type, type in another window:\n";
+ print "cd $glob_mysql_test_dir;\n";
+ print "ddd -x $gdb_init_file $$exe\n";
+
+ # Indicate the exe should not be started
+ $$exe= undef;
+ return;
}
my $save_exe= $$exe;
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2100) | msvensson | 23 Mar |