summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-01-22 13:43:06 +0100
committerSergei Golubchik <serg@mariadb.org>2021-01-24 11:35:55 +0100
commit1a99958545f923f39344abe8b57bc80a2072510d (patch)
treea95f78defc6e853d534b87276d911fadda108943
parent29bbcac0ee841faaa68eeb09c86ff825eabbe6b6 (diff)
downloadmariadb-git-1a99958545f923f39344abe8b57bc80a2072510d.tar.gz
mtr: --client-gdb='<gdb commands>'
-rwxr-xr-xmysql-test/mysql-test-run.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 7b73782eedc..05ceab98d7e 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1323,7 +1323,7 @@ sub command_line_setup {
'rr' => \$opt_rr,
'rr-arg=s' => \@rr_record_args,
'rr-dir=s' => \$opt_rr_dir,
- 'client-gdb' => \$opt_client_gdb,
+ 'client-gdb=s' => \$opt_client_gdb,
'manual-gdb' => \$opt_manual_gdb,
'manual-lldb' => \$opt_manual_lldb,
'boot-gdb' => \$opt_boot_gdb,
@@ -1420,7 +1420,7 @@ sub command_line_setup {
);
# fix options (that take an optional argument and *only* after = sign
- my %fixopt = ( '--gdb' => '--gdb=#' );
+ my %fixopt = ( '--gdb' => '--gdb=#', '--client-gdb' => '--client-gdb=#' );
@ARGV = map { $fixopt{$_} or $_ } @ARGV;
GetOptions(%options) or usage("Can't read options");
usage("") if $opt_usage;
@@ -6064,7 +6064,11 @@ sub gdb_arguments {
$input = $input ? "< $input" : "";
if ($type eq 'client') {
- mtr_tofile($gdb_init_file, "set args @$$args $input");
+ mtr_tofile($gdb_init_file,
+ join("\n",
+ "set args @$$args $input",
+ split /;/, $opt_client_gdb || ""
+ ));
} elsif ($opt_valgrind_mysqld) {
my $v = $$exe;
my $vargs = [];