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

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Sergei Glushchenko
Approved revision: no longer in the source branch.
Merged at revision: 685
Proposed branch: lp:~laurynas-biveinis/percona-server/mtr-manual-lldb-5.5
Merge into: lp:percona-server/5.5
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.5
Reviewer Review Type Date Requested Status
Sergei Glushchenko (community) g2 Approve
Review via email: mp+222618@code.launchpad.net

Description of the change

Merge mysql-test-run.pl --manual-lldb from 5.1.

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-03-27 15:42:21 +0000
+++ mysql-test/mysql-test-run.pl 2014-06-10 11:01:44 +0000
@@ -234,6 +234,7 @@
234my $opt_boot_ddd;234my $opt_boot_ddd;
235our $opt_manual_gdb;235our $opt_manual_gdb;
236our $opt_manual_dbx;236our $opt_manual_dbx;
237our $opt_manual_lldb;
237our $opt_manual_ddd;238our $opt_manual_ddd;
238our $opt_manual_debug;239our $opt_manual_debug;
239our $opt_debugger;240our $opt_debugger;
@@ -1089,6 +1090,7 @@
1089 'gdb' => \$opt_gdb,1090 'gdb' => \$opt_gdb,
1090 'client-gdb' => \$opt_client_gdb,1091 'client-gdb' => \$opt_client_gdb,
1091 'manual-gdb' => \$opt_manual_gdb,1092 'manual-gdb' => \$opt_manual_gdb,
1093 'manual-lldb' => \$opt_manual_lldb,
1092 'boot-gdb' => \$opt_boot_gdb,1094 'boot-gdb' => \$opt_boot_gdb,
1093 'manual-debug' => \$opt_manual_debug,1095 'manual-debug' => \$opt_manual_debug,
1094 'ddd' => \$opt_ddd,1096 'ddd' => \$opt_ddd,
@@ -1541,7 +1543,8 @@
1541 }1543 }
15421544
1543 if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_ddd ||1545 if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_ddd ||
1544 $opt_manual_debug || $opt_debugger || $opt_dbx || $opt_manual_dbx)1546 $opt_manual_debug || $opt_debugger || $opt_dbx || $opt_manual_dbx ||
1547 $opt_manual_lldb)
1545 {1548 {
1546 mtr_error("You need to use the client debug options for the",1549 mtr_error("You need to use the client debug options for the",
1547 "embedded server. Ex: --client-gdb");1550 "embedded server. Ex: --client-gdb");
@@ -1570,7 +1573,7 @@
1570 if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||1573 if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
1571 $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug ||1574 $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug ||
1572 $opt_dbx || $opt_client_dbx || $opt_manual_dbx ||1575 $opt_dbx || $opt_client_dbx || $opt_manual_dbx ||
1573 $opt_debugger || $opt_client_debugger )1576 $opt_manual_lldb || $opt_debugger || $opt_client_debugger )
1574 {1577 {
1575 # Indicate that we are using debugger1578 # Indicate that we are using debugger
1576 $glob_debugger= 1;1579 $glob_debugger= 1;
@@ -4996,6 +4999,10 @@
4996 {4999 {
4997 gdb_arguments(\$args, \$exe, $mysqld->name());5000 gdb_arguments(\$args, \$exe, $mysqld->name());
4998 }5001 }
5002 elsif ( $opt_manual_lldb )
5003 {
5004 lldb_arguments(\$args, \$exe, $mysqld->name());
5005 }
4999 elsif ( $opt_ddd || $opt_manual_ddd )5006 elsif ( $opt_ddd || $opt_manual_ddd )
5000 {5007 {
5001 ddd_arguments(\$args, \$exe, $mysqld->name());5008 ddd_arguments(\$args, \$exe, $mysqld->name());
@@ -5743,6 +5750,34 @@
57435750
57445751
5745#5752#
5753# Modify the exe and args so that program is run in lldb
5754#
5755sub lldb_arguments {
5756 my $args= shift;
5757 my $exe= shift;
5758 my $type= shift;
5759 my $input= shift;
5760
5761 my $lldb_init_file= "$opt_vardir/tmp/lldbinit.$type";
5762 unlink($lldb_init_file);
5763
5764 my $str= join(" ", @$$args);
5765 my $runline= $input ? "r $str < $input" : "r $str";
5766
5767 # write init file for mysqld or client
5768 mtr_tofile($lldb_init_file,
5769 "b main\n" .
5770 $runline);
5771
5772 print "\nTo start lldb for $type, type in another window:\n";
5773 print "(cd $glob_mysql_test_dir && lldb -s $lldb_init_file $$exe)\n";
5774
5775 # Indicate the exe should not be started
5776 $$exe= undef;
5777 return;
5778}
5779
5780#
5746# Modify the exe and args so that program is run in ddd5781# Modify the exe and args so that program is run in ddd
5747#5782#
5748sub ddd_arguments {5783sub ddd_arguments {
@@ -6201,6 +6236,8 @@
6201 running test(s)6236 running test(s)
6202 manual-gdb Let user manually start mysqld in gdb, before running6237 manual-gdb Let user manually start mysqld in gdb, before running
6203 test(s)6238 test(s)
6239 manual-lldb Let user manually start mysqld in lldb, before running
6240 test(s)
6204 manual-ddd Let user manually start mysqld in ddd, before running6241 manual-ddd Let user manually start mysqld in ddd, before running
6205 test(s)6242 test(s)
6206 manual-dbx Let user manually start mysqld in dbx, before running6243 manual-dbx Let user manually start mysqld in dbx, before running

Subscribers

People subscribed via source and target branches