diff options
author | Jim Ingham <jingham@apple.com> | 2013-09-10 02:09:47 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2013-09-10 02:09:47 +0000 |
commit | df0ae22f92ea1c371640fa9d2b5d461e7b38207f (patch) | |
tree | 6b7e4e0b29af477857b4b119f952a64024efe5ab /lldb/source/Target/Process.cpp | |
parent | df59c4a93744e3f827f4d7fe9f35e06e31966520 (diff) | |
download | bcm5719-llvm-df0ae22f92ea1c371640fa9d2b5d461e7b38207f.tar.gz bcm5719-llvm-df0ae22f92ea1c371640fa9d2b5d461e7b38207f.zip |
Changing the default shell to /bin/sh brought up a long-standing bug on OS X,
that /bin/sh re-exec's itself to /bin/bash, so it needs one more resume when you
are using it as the shell than /bin/bash did or you will stop at the start of your
program, rather than running it.
So I added a Platform API to get the number of resumes needed when launching with
a particular shell, and set the right values for Mac OS X.
<rdar://problem/14935282>
llvm-svn: 190381
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 75469394b2a..d6cd7bbd3aa 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -489,7 +489,8 @@ bool ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell (Error &error, bool localhost, bool will_debug, - bool first_arg_is_full_shell_command) + bool first_arg_is_full_shell_command, + int32_t num_resumes) { error.Clear(); @@ -571,14 +572,14 @@ ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell (Error &error, // 1 - stop in shell // 2 - stop in /usr/bin/arch // 3 - then we will stop in our program - SetResumeCount(2); + SetResumeCount(num_resumes + 1); } else { // Set the resume count to 1: // 1 - stop in shell // 2 - then we will stop in our program - SetResumeCount(1); + SetResumeCount(num_resumes); } } |