488
493
# Run test on running server
489
494
'extern' => \$opt_extern,
497
'subunit' => \$opt_subunit,
492
500
'gdb' => \$opt_gdb,
493
502
'client-gdb' => \$opt_client_gdb,
503
'client-dbx' => \$opt_client_dbx,
494
504
'manual-gdb' => \$opt_manual_gdb,
505
'manual-dbx' => \$opt_manual_dbx,
495
506
'manual-debug' => \$opt_manual_debug,
496
507
'ddd' => \$opt_ddd,
497
508
'client-ddd' => \$opt_client_ddd,
571
582
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);
573
588
$glob_scriptname= basename($0);
575
590
if ($opt_mtr_build_thread != 0)
790
805
# --------------------------------------------------------------------------
791
806
if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
792
807
$opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug ||
793
$opt_debugger || $opt_client_debugger )
808
$opt_debugger || $opt_client_debugger || $opt_gdb || $opt_manual_gdb)
795
810
# Indicate that we are using debugger
796
811
$glob_debugger= 1;
2569
2584
ddd_arguments(\$args, \$exe, "$type"."_$idx");
2586
if ( $opt_dbx || $opt_manual_dbx)
2588
dbx_arguments(\$args, \$exe, "$type"."_$idx");
2571
2590
elsif ( $opt_debugger )
2573
2592
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");
3161
3233
# Modify the exe and args so that program is run in gdb in xterm
3302
3374
$$exe= $debugger;
3305
elsif ( $debugger eq "dbx" )
3307
# xterm -e dbx -r exe arg1 .. argn
3309
unshift(@$$args, $$exe);
3310
unshift(@$$args, "-r");
3311
unshift(@$$args, $debugger);
3312
unshift(@$$args, "-e");
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");
3319
3391
mtr_error("Unknown argument \"$debugger\" passed to --debugger");