summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-01-08 11:55:19 +0000
committerPavel Labath <pavel@labath.sk>2019-01-08 11:55:19 +0000
commit8e55ddef8c141fd204fcbfefafff70e3b150efd7 (patch)
tree71aa079c62ae0b7c06806a62c36d13d9b74da440 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parent6135b0f88c83a480d7c2116ac9c0e589f536e0c4 (diff)
downloadbcm5719-llvm-8e55ddef8c141fd204fcbfefafff70e3b150efd7.tar.gz
bcm5719-llvm-8e55ddef8c141fd204fcbfefafff70e3b150efd7.zip
ProcessLaunchInfo: Remove Target reference
Summary: The target was being used in FinalizeFileActions to provide default values for stdin/out/err. Also, most of the logic of this function was very specific to how the lldb's Target class wants to launch processes, so I, move it to Target::FinalizeFileActions, inverting the dependency. The only piece of logic that was useful elsewhere (lldb-server) was the part which sets up a pty and relevant file actions. I've kept this part as ProcessLaunchInfo::SetUpPtyRedirection. This makes ProcessLaunchInfo independent of any high-level lldb constructs. Reviewers: zturner, jingham, teemperor Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56196 llvm-svn: 350617
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index d15f54dcc2a..cdb63e72f6b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -218,8 +218,10 @@ Status GDBRemoteCommunicationServerLLGS::LaunchProcess() {
m_process_launch_info.SetLaunchInSeparateProcessGroup(true);
m_process_launch_info.GetFlags().Set(eLaunchFlagDebug);
- const bool default_to_use_pty = true;
- m_process_launch_info.FinalizeFileActions(nullptr, default_to_use_pty);
+ if (should_forward_stdio) {
+ if (llvm::Error Err = m_process_launch_info.SetUpPtyRedirection())
+ return Status(std::move(Err));
+ }
{
std::lock_guard<std::recursive_mutex> guard(m_debugged_process_mutex);
OpenPOWER on IntegriCloud