Added the ability to run a process in a shell on MacOSX currently when using
the --tty option. So you can now get shell expansion and file redirection:
(lldb) process launch --tty --shell -- *.jpg < in.txt > out.txt
Again, the "--tty" is mandatory for now until we hook this up to other
functions. The shell is also currently hard coded to "/bin/bash" and not the
"SHELL" variable. "/bin/tcsh" was causing problems which I need to dig into.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144443 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectProcess.cpp b/source/Commands/CommandObjectProcess.cpp
index ae6984e..e7d392d 100644
--- a/source/Commands/CommandObjectProcess.cpp
+++ b/source/Commands/CommandObjectProcess.cpp
@@ -232,6 +232,8 @@
if (m_options.launch_info.GetFlags().Test (eLaunchFlagLaunchInTTY))
{
+ m_options.launch_info.GetArchitecture() = target->GetArchitecture();
+
process = target->GetPlatform()->DebugProcess (m_options.launch_info,
debugger,
target,
@@ -695,7 +697,7 @@
if (attach_pid != LLDB_INVALID_PROCESS_ID)
{
- error = process->Attach (attach_pid);
+ error = process->Attach (attach_pid, 0);
if (error.Success())
{
result.SetStatus (eReturnStatusSuccessContinuingNoResult);