diff options
author | Greg Clayton <gclayton@apple.com> | 2011-11-12 02:10:56 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-11-12 02:10:56 +0000 |
commit | c9ed478a39586878e05f56b46973112aa9f874ca (patch) | |
tree | 60f85633486b5343eadf0e8581f172d8abe4dd60 /lldb/source/Commands/CommandObjectProcess.cpp | |
parent | ecb453805d44fa40cfd61688ec196ad2850d6405 (diff) | |
download | llvm-c9ed478a39586878e05f56b46973112aa9f874ca.zip llvm-c9ed478a39586878e05f56b46973112aa9f874ca.tar.gz llvm-c9ed478a39586878e05f56b46973112aa9f874ca.tar.bz2 |
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.
llvm-svn: 144443
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index ae6984e..e7d392da 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -232,6 +232,8 @@ public: 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 @@ public: if (attach_pid != LLDB_INVALID_PROCESS_ID) { - error = process->Attach (attach_pid); + error = process->Attach (attach_pid, 0); if (error.Success()) { result.SetStatus (eReturnStatusSuccessContinuingNoResult); |