Merge lp:~laurynas-biveinis/percona-server/mtr-manual-lldb-5.6 into lp:percona-server/5.6

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Sergei Glushchenko
Approved revision: no longer in the source branch.
Merged at revision: 635
Proposed branch: lp:~laurynas-biveinis/percona-server/mtr-manual-lldb-5.6
Merge into: lp:percona-server/5.6
Diff against target: 93 lines (+39/-2)
1 file modified
mysql-test/mysql-test-run.pl (+39/-2)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/mtr-manual-lldb-5.6
Reviewer Review Type Date Requested Status
Sergei Glushchenko (community) g2 Approve
Review via email: mp+222619@code.launchpad.net

Description of the change

Automerge mysql-test-run --manual-lldb from 5.5.

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Approve

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) :
review: Approve (g2)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mysql-test/mysql-test-run.pl'
--- mysql-test/mysql-test-run.pl 2014-06-06 06:29:46 +0000
+++ mysql-test/mysql-test-run.pl 2014-06-10 11:02:56 +0000
@@ -237,6 +237,7 @@
237my $opt_boot_ddd;237my $opt_boot_ddd;
238our $opt_manual_gdb;238our $opt_manual_gdb;
239our $opt_manual_dbx;239our $opt_manual_dbx;
240our $opt_manual_lldb;
240our $opt_manual_ddd;241our $opt_manual_ddd;
241our $opt_manual_debug;242our $opt_manual_debug;
242our $opt_debugger;243our $opt_debugger;
@@ -1095,6 +1096,7 @@
1095 'gdb' => \$opt_gdb,1096 'gdb' => \$opt_gdb,
1096 'client-gdb' => \$opt_client_gdb,1097 'client-gdb' => \$opt_client_gdb,
1097 'manual-gdb' => \$opt_manual_gdb,1098 'manual-gdb' => \$opt_manual_gdb,
1099 'manual-lldb' => \$opt_manual_lldb,
1098 'boot-gdb' => \$opt_boot_gdb,1100 'boot-gdb' => \$opt_boot_gdb,
1099 'manual-debug' => \$opt_manual_debug,1101 'manual-debug' => \$opt_manual_debug,
1100 'ddd' => \$opt_ddd,1102 'ddd' => \$opt_ddd,
@@ -1553,7 +1555,8 @@
1553 }1555 }
15541556
1555 if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_ddd ||1557 if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_ddd ||
1556 $opt_manual_debug || $opt_debugger || $opt_dbx || $opt_manual_dbx)1558 $opt_manual_debug || $opt_debugger || $opt_dbx || $opt_manual_dbx ||
1559 $opt_manual_lldb)
1557 {1560 {
1558 mtr_error("You need to use the client debug options for the",1561 mtr_error("You need to use the client debug options for the",
1559 "embedded server. Ex: --client-gdb");1562 "embedded server. Ex: --client-gdb");
@@ -1582,7 +1585,7 @@
1582 if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||1585 if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
1583 $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug ||1586 $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug ||
1584 $opt_dbx || $opt_client_dbx || $opt_manual_dbx ||1587 $opt_dbx || $opt_client_dbx || $opt_manual_dbx ||
1585 $opt_debugger || $opt_client_debugger )1588 $opt_manual_lldb || $opt_debugger || $opt_client_debugger )
1586 {1589 {
1587 # Indicate that we are using debugger1590 # Indicate that we are using debugger
1588 $glob_debugger= 1;1591 $glob_debugger= 1;
@@ -5271,6 +5274,10 @@
5271 {5274 {
5272 gdb_arguments(\$args, \$exe, $mysqld->name());5275 gdb_arguments(\$args, \$exe, $mysqld->name());
5273 }5276 }
5277 elsif ( $opt_manual_lldb )
5278 {
5279 lldb_arguments(\$args, \$exe, $mysqld->name());
5280 }
5274 elsif ( $opt_ddd || $opt_manual_ddd )5281 elsif ( $opt_ddd || $opt_manual_ddd )
5275 {5282 {
5276 ddd_arguments(\$args, \$exe, $mysqld->name());5283 ddd_arguments(\$args, \$exe, $mysqld->name());
@@ -6085,6 +6092,34 @@
60856092
60866093
6087#6094#
6095# Modify the exe and args so that program is run in lldb
6096#
6097sub lldb_arguments {
6098 my $args= shift;
6099 my $exe= shift;
6100 my $type= shift;
6101 my $input= shift;
6102
6103 my $lldb_init_file= "$opt_vardir/tmp/lldbinit.$type";
6104 unlink($lldb_init_file);
6105
6106 my $str= join(" ", @$$args);
6107 my $runline= $input ? "r $str < $input" : "r $str";
6108
6109 # write init file for mysqld or client
6110 mtr_tofile($lldb_init_file,
6111 "b main\n" .
6112 $runline);
6113
6114 print "\nTo start lldb for $type, type in another window:\n";
6115 print "(cd $glob_mysql_test_dir && lldb -s $lldb_init_file $$exe)\n";
6116
6117 # Indicate the exe should not be started
6118 $$exe= undef;
6119 return;
6120}
6121
6122#
6088# Modify the exe and args so that program is run in ddd6123# Modify the exe and args so that program is run in ddd
6089#6124#
6090sub ddd_arguments {6125sub ddd_arguments {
@@ -6564,6 +6599,8 @@
6564 running test(s)6599 running test(s)
6565 manual-gdb Let user manually start mysqld in gdb, before running6600 manual-gdb Let user manually start mysqld in gdb, before running
6566 test(s)6601 test(s)
6602 manual-lldb Let user manually start mysqld in lldb, before running
6603 test(s)
6567 manual-ddd Let user manually start mysqld in ddd, before running6604 manual-ddd Let user manually start mysqld in ddd, before running
6568 test(s)6605 test(s)
6569 manual-dbx Let user manually start mysqld in dbx, before running6606 manual-dbx Let user manually start mysqld in dbx, before running

Subscribers

People subscribed via source and target branches