493
489
# Run test on running server
494
490
'extern' => \$opt_extern,
497
'subunit' => \$opt_subunit,
500
493
'gdb' => \$opt_gdb,
502
494
'client-gdb' => \$opt_client_gdb,
503
'client-dbx' => \$opt_client_dbx,
504
495
'manual-gdb' => \$opt_manual_gdb,
505
'manual-dbx' => \$opt_manual_dbx,
506
496
'manual-debug' => \$opt_manual_debug,
507
497
'ddd' => \$opt_ddd,
508
498
'client-ddd' => \$opt_client_ddd,
582
572
usage("") if $opt_usage;
584
usage("you cannot specify --gdb and --dbx both!") if
585
($opt_gdb && $opt_dbx) ||
586
($opt_manual_gdb && $opt_manual_dbx);
588
574
$glob_scriptname= basename($0);
590
576
if ($opt_mtr_build_thread != 0)
805
791
# --------------------------------------------------------------------------
806
792
if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
807
793
$opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug ||
808
$opt_debugger || $opt_client_debugger || $opt_gdb || $opt_manual_gdb)
794
$opt_debugger || $opt_client_debugger )
810
796
# Indicate that we are using debugger
811
797
$glob_debugger= 1;
1215
1201
$exe_perror= "perror";
1217
1203
# Look for the client binaries
1204
$exe_drizzlecheck= mtr_exe_exists("$path_client_bindir/drizzlecheck");
1218
1205
$exe_drizzledump= mtr_exe_exists("$path_client_bindir/drizzledump");
1219
1206
$exe_drizzleimport= mtr_exe_exists("$path_client_bindir/drizzleimport");
1220
1207
$exe_drizzle= mtr_exe_exists("$path_client_bindir/drizzle");
1405
1392
$ENV{'EXE_MYSQL'}= $exe_drizzle;
1394
# ----------------------------------------------------
1395
# Setup env so childs can execute mysqlcheck
1396
# ----------------------------------------------------
1397
my $cmdline_mysqlcheck=
1398
mtr_native_path($exe_drizzlecheck) .
1399
" --no-defaults --debug-check -uroot " .
1400
"--port=$master->[0]->{'port'} ";
1404
$cmdline_mysqlcheck .=
1405
" --debug=d:t:A,$path_vardir_trace/log/mysqlcheck.trace";
1407
$ENV{'DRIZZLE_CHECK'}= $cmdline_mysqlcheck;
1408
1409
# ----------------------------------------------------
1409
1410
# Setup env to childs can execute myqldump
2584
2585
ddd_arguments(\$args, \$exe, "$type"."_$idx");
2586
if ( $opt_dbx || $opt_manual_dbx)
2588
dbx_arguments(\$args, \$exe, "$type"."_$idx");
2590
2587
elsif ( $opt_debugger )
2592
2589
debugger_arguments(\$args, \$exe, "$type"."_$idx");
3179
# Modify the exe and args so that program is run in gdb in xterm
3186
# Write $args to gdb init file
3187
my $str= join(" ", @$$args);
3188
my $dbx_init_file= "$opt_tmpdir/dbxinit.$type";
3190
# Remove the old gdbinit file
3191
unlink($dbx_init_file);
3192
if ( $type eq "client" )
3194
# write init file for client
3195
mtr_tofile($dbx_init_file,
3201
# write init file for drizzled
3202
mtr_tofile($dbx_init_file,
3203
"stop in mysql_parse\n" .
3209
if ( $opt_manual_dbx )
3211
print "\nTo start dbx for $type, type in another window:\n";
3212
print "dbx -c 'source $dbx_init_file' $$exe\n";
3214
# Indicate the exe should not be started
3220
mtr_add_arg($$args, "-title");
3221
mtr_add_arg($$args, "$type");
3222
mtr_add_arg($$args, "-e");
3224
mtr_add_arg($$args, "dbx");
3225
mtr_add_arg($$args, "-c");
3226
mtr_add_arg($$args, "source $dbx_init_file");
3227
mtr_add_arg($$args, "$$exe");
3233
3177
# Modify the exe and args so that program is run in gdb in xterm
3374
3318
$$exe= $debugger;
3377
#elsif ( $debugger eq "dbx" )
3379
# # xterm -e dbx -r exe arg1 .. argn
3381
# unshift(@$$args, $$exe);
3382
# unshift(@$$args, "-r");
3383
# unshift(@$$args, $debugger);
3384
# unshift(@$$args, "-e");
3321
elsif ( $debugger eq "dbx" )
3323
# xterm -e dbx -r exe arg1 .. argn
3325
unshift(@$$args, $$exe);
3326
unshift(@$$args, "-r");
3327
unshift(@$$args, $debugger);
3328
unshift(@$$args, "-e");
3391
3335
mtr_error("Unknown argument \"$debugger\" passed to --debugger");