mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #19361317 - --MANUAL-GDB EFFECTIVELY TRUNCATES OPTION FILE ARGS AT FIRST SEMICOLON
This commit is contained in:
@ -5684,6 +5684,24 @@ sub start_mysqltest ($) {
|
|||||||
return $proc;
|
return $proc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub create_debug_statement {
|
||||||
|
my $args= shift;
|
||||||
|
my $input= shift;
|
||||||
|
|
||||||
|
# Put $args into a single string
|
||||||
|
my $str= join(" ", @$$args);
|
||||||
|
my $runline= $input ? "run $str < $input" : "run $str";
|
||||||
|
|
||||||
|
# add quotes to escape ; in plugin_load option
|
||||||
|
my $pos1 = index($runline, "--plugin_load=");
|
||||||
|
if ( $pos1 != -1 ) {
|
||||||
|
my $pos2 = index($runline, " ",$pos1);
|
||||||
|
substr($runline,$pos1+14,0) = "\"";
|
||||||
|
substr($runline,$pos2+1,0) = "\"";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $runline;
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Modify the exe and args so that program is run in gdb in xterm
|
# Modify the exe and args so that program is run in gdb in xterm
|
||||||
@ -5699,9 +5717,7 @@ sub gdb_arguments {
|
|||||||
# Remove the old gdbinit file
|
# Remove the old gdbinit file
|
||||||
unlink($gdb_init_file);
|
unlink($gdb_init_file);
|
||||||
|
|
||||||
# Put $args into a single string
|
my $runline=create_debug_statement($args,$input);
|
||||||
my $str= join(" ", @$$args);
|
|
||||||
my $runline= $input ? "run $str < $input" : "run $str";
|
|
||||||
|
|
||||||
# write init file for mysqld or client
|
# write init file for mysqld or client
|
||||||
mtr_tofile($gdb_init_file,
|
mtr_tofile($gdb_init_file,
|
||||||
@ -5749,8 +5765,7 @@ sub lldb_arguments {
|
|||||||
my $lldb_init_file= "$opt_vardir/tmp/lldbinit.$type";
|
my $lldb_init_file= "$opt_vardir/tmp/lldbinit.$type";
|
||||||
unlink($lldb_init_file);
|
unlink($lldb_init_file);
|
||||||
|
|
||||||
my $str= join(" ", @$$args);
|
my $runline=create_debug_statement($args,$input);
|
||||||
my $runline= $input ? "r $str < $input" : "r $str";
|
|
||||||
|
|
||||||
# write init file for mysqld or client
|
# write init file for mysqld or client
|
||||||
mtr_tofile($lldb_init_file,
|
mtr_tofile($lldb_init_file,
|
||||||
@ -5779,9 +5794,7 @@ sub ddd_arguments {
|
|||||||
# Remove the old gdbinit file
|
# Remove the old gdbinit file
|
||||||
unlink($gdb_init_file);
|
unlink($gdb_init_file);
|
||||||
|
|
||||||
# Put $args into a single string
|
my $runline=create_debug_statement($args,$input);
|
||||||
my $str= join(" ", @$$args);
|
|
||||||
my $runline= $input ? "run $str < $input" : "run $str";
|
|
||||||
|
|
||||||
# write init file for mysqld or client
|
# write init file for mysqld or client
|
||||||
mtr_tofile($gdb_init_file,
|
mtr_tofile($gdb_init_file,
|
||||||
|
Reference in New Issue
Block a user