Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3fef119d
Commit
3fef119d
authored
Sep 11, 2014
by
Sayantan Dutta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #18964545 ADD MTR SUPPORT FOR DEBUGGING WITH LLDB
parent
2fceabfe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
11 deletions
+50
-11
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+50
-11
No files found.
mysql-test/mysql-test-run.pl
View file @
3fef119d
...
...
@@ -223,8 +223,11 @@ our %gprof_dirs;
our
$glob_debugger
=
0
;
our
$opt_gdb
;
our
$opt_lldb
;
our
$opt_client_gdb
;
our
$opt_client_lldb
;
my
$opt_boot_gdb
;
my
$opt_boot_lldb
;
our
$opt_dbx
;
our
$opt_client_dbx
;
my
$opt_boot_dbx
;
...
...
@@ -1085,10 +1088,13 @@ sub command_line_setup {
'
debug-common
'
=>
\
$opt_debug_common
,
'
debug-server
'
=>
\
$opt_debug_server
,
'
gdb
'
=>
\
$opt_gdb
,
'
lldb
'
=>
\
$opt_lldb
,
'
client-gdb
'
=>
\
$opt_client_gdb
,
'
client-lldb
'
=>
\
$opt_client_lldb
,
'
manual-gdb
'
=>
\
$opt_manual_gdb
,
'
manual-lldb
'
=>
\
$opt_manual_lldb
,
'
boot-gdb
'
=>
\
$opt_boot_gdb
,
'
boot-lldb
'
=>
\
$opt_boot_lldb
,
'
manual-debug
'
=>
\
$opt_manual_debug
,
'
ddd
'
=>
\
$opt_ddd
,
'
client-ddd
'
=>
\
$opt_client_ddd
,
...
...
@@ -1518,6 +1524,13 @@ sub command_line_setup {
$opt_gdb
=
undef
;
}
if
(
$opt_lldb
)
{
mtr_warning
("
Silently converting --lldb to --client-lldb in embedded mode
");
$opt_client_lldb
=
$opt_lldb
;
$opt_lldb
=
undef
;
}
if
(
$opt_ddd
)
{
mtr_warning
("
Silently converting --ddd to --client-ddd in embedded mode
");
...
...
@@ -1538,7 +1551,7 @@ sub command_line_setup {
$opt_debugger
=
undef
;
}
if
(
$opt_gdb
||
$opt_ddd
||
$opt_manual_gdb
||
$opt_manual_lldb
||
if
(
$opt_gdb
||
$opt_ddd
||
$opt_
lldb
||
$opt_
manual_gdb
||
$opt_manual_lldb
||
$opt_manual_ddd
||
$opt_manual_debug
||
$opt_debugger
||
$opt_dbx
||
$opt_manual_dbx
)
{
...
...
@@ -1566,10 +1579,10 @@ sub command_line_setup {
# --------------------------------------------------------------------------
# Check debug related options
# --------------------------------------------------------------------------
if
(
$opt_gdb
||
$opt_client_gdb
||
$opt_
ddd
||
$opt_client_ddd
||
$opt_
manual_gdb
||
$opt_manual_gdb
||
$opt_manual_ddd
||
$opt_manual_debug
||
$opt_
dbx
||
$opt_client_dbx
||
$opt_manual
_dbx
||
$opt_debugger
||
$opt_client_debugger
)
if
(
$opt_gdb
||
$opt_client_gdb
||
$opt_
lldb
||
$opt_client_lldb
||
$opt_
ddd
||
$opt_client_ddd
||
$opt_manual_gdb
||
$opt_manual_gdb
||
$opt_
manual_ddd
||
$opt_manual_debug
||
$opt_dbx
||
$opt_client
_dbx
||
$opt_
manual_dbx
||
$opt_
debugger
||
$opt_client_debugger
)
{
# Indicate that we are using debugger
$glob_debugger
=
1
;
...
...
@@ -3328,6 +3341,10 @@ sub mysql_install_db {
gdb_arguments
(
\
$args
,
\
$exe_mysqld_bootstrap
,
$mysqld
->
name
(),
$bootstrap_sql_file
);
}
if
(
$opt_boot_lldb
)
{
lldb_arguments
(
\
$args
,
\
$exe_mysqld_bootstrap
,
$mysqld
->
name
(),
$bootstrap_sql_file
);
}
if
(
$opt_boot_dbx
)
{
dbx_arguments
(
\
$args
,
\
$exe_mysqld_bootstrap
,
$mysqld
->
name
(),
$bootstrap_sql_file
);
...
...
@@ -4988,7 +5005,7 @@ sub mysqld_start ($$) {
{
gdb_arguments
(
\
$args
,
\
$exe
,
$mysqld
->
name
());
}
elsif
(
$opt_manual_lldb
)
elsif
(
$opt_
lldb
||
$opt_
manual_lldb
)
{
lldb_arguments
(
\
$args
,
\
$exe
,
$mysqld
->
name
());
}
...
...
@@ -5659,6 +5676,10 @@ sub start_mysqltest ($) {
{
gdb_arguments
(
\
$args
,
\
$exe
,
"
client
");
}
if
(
$opt_client_lldb
)
{
lldb_arguments
(
\
$args
,
\
$exe
,
"
client
");
}
elsif
(
$opt_client_ddd
)
{
ddd_arguments
(
\
$args
,
\
$exe
,
"
client
");
...
...
@@ -5772,12 +5793,30 @@ sub lldb_arguments {
"
b main
\n
"
.
$runline
);
if
(
$opt_manual_ddd
)
{
print
"
\n
To start lldb for
$type
, type in another window:
\n
";
print
"
cd
$glob_mysql_test_dir
&& lldb -s
$lldb_init_file
$
$exe
\n
";
# Indicate the exe should not be started
$$exe
=
undef
;
return
;
}
my
$save_exe
=
$$exe
;
$$args
=
[]
;
if
(
$exe_libtool
)
{
$$exe
=
$exe_libtool
;
mtr_add_arg
(
$$args
,
"
--mode=execute
");
mtr_add_arg
(
$$args
,
"
lldb
");
}
else
{
$$exe
=
"
lldb
";
}
mtr_add_arg
(
$$args
,
"
--command=
$lldb_init_file
");
mtr_add_arg
(
$$args
,
"
$save_exe
");
}
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment