summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-09-12 22:38:39 +0000
committerZachary Turner <zturner@google.com>2014-09-12 22:38:39 +0000
commit44e442b3dfc585bf7afc67075f747471253a5a5d (patch)
treef31fc7e3d17204a0261fbcae7f1b491d7e64a544
parente4b846e0d8c5715adddd3a974938312fb83a3178 (diff)
downloadbcm5719-llvm-44e442b3dfc585bf7afc67075f747471253a5a5d.tar.gz
bcm5719-llvm-44e442b3dfc585bf7afc67075f747471253a5a5d.zip
Make ProcessLaunchInfo copyable.
llvm-svn: 217714
-rw-r--r--lldb/include/lldb/Target/ProcessLaunchInfo.h4
-rw-r--r--lldb/source/Target/ProcessLaunchInfo.cpp32
2 files changed, 18 insertions, 18 deletions
diff --git a/lldb/include/lldb/Target/ProcessLaunchInfo.h b/lldb/include/lldb/Target/ProcessLaunchInfo.h
index 77d829a7e47..ccccc8af807 100644
--- a/lldb/include/lldb/Target/ProcessLaunchInfo.h
+++ b/lldb/include/lldb/Target/ProcessLaunchInfo.h
@@ -169,7 +169,7 @@ namespace lldb_private
lldb_utility::PseudoTerminal &
GetPTY ()
{
- return m_pty;
+ return *m_pty;
}
lldb::ListenerSP
@@ -212,7 +212,7 @@ namespace lldb_private
std::string m_shell;
Flags m_flags; // Bitwise OR of bits from lldb::LaunchFlags
std::vector<FileAction> m_file_actions; // File actions for any other files
- lldb_utility::PseudoTerminal m_pty;
+ std::shared_ptr<lldb_utility::PseudoTerminal> m_pty;
uint32_t m_resume_count; // How many times do we resume after launching
Host::MonitorChildProcessCallback m_monitor_callback;
void *m_monitor_callback_baton;
diff --git a/lldb/source/Target/ProcessLaunchInfo.cpp b/lldb/source/Target/ProcessLaunchInfo.cpp
index 93f12e6f3cf..2d1bfa4b9c6 100644
--- a/lldb/source/Target/ProcessLaunchInfo.cpp
+++ b/lldb/source/Target/ProcessLaunchInfo.cpp
@@ -31,7 +31,7 @@ ProcessLaunchInfo::ProcessLaunchInfo () :
m_shell (),
m_flags (0),
m_file_actions (),
- m_pty (),
+ m_pty (new lldb_utility::PseudoTerminal),
m_resume_count (0),
m_monitor_callback (NULL),
m_monitor_callback_baton (NULL),
@@ -41,19 +41,19 @@ ProcessLaunchInfo::ProcessLaunchInfo () :
}
ProcessLaunchInfo::ProcessLaunchInfo(const char *stdin_path, const char *stdout_path, const char *stderr_path,
- const char *working_directory, uint32_t launch_flags) :
- ProcessInfo(),
- m_working_dir(),
- m_plugin_name(),
- m_shell(),
- m_flags(launch_flags),
- m_file_actions(),
- m_pty(),
- m_resume_count(0),
- m_monitor_callback(NULL),
- m_monitor_callback_baton(NULL),
- m_monitor_signals(false),
- m_hijack_listener_sp()
+ const char *working_directory, uint32_t launch_flags)
+ : ProcessInfo()
+ , m_working_dir()
+ , m_plugin_name()
+ , m_shell()
+ , m_flags(launch_flags)
+ , m_file_actions()
+ , m_pty(new lldb_utility::PseudoTerminal)
+ , m_resume_count(0)
+ , m_monitor_callback(NULL)
+ , m_monitor_callback_baton(NULL)
+ , m_monitor_signals(false)
+ , m_hijack_listener_sp()
{
if (stdin_path)
{
@@ -304,8 +304,8 @@ ProcessLaunchInfo::FinalizeFileActions (Target *target, bool default_to_use_pty)
AppendOpenFileAction(STDERR_FILENO, path, false, true);
if (default_to_use_pty && (!in_path || !out_path || !err_path)) {
- if (m_pty.OpenFirstAvailableMaster(O_RDWR| O_NOCTTY, NULL, 0)) {
- const char *slave_path = m_pty.GetSlaveName(NULL, 0);
+ if (m_pty->OpenFirstAvailableMaster(O_RDWR| O_NOCTTY, NULL, 0)) {
+ const char *slave_path = m_pty->GetSlaveName(NULL, 0);
if (!in_path) {
AppendOpenFileAction(STDIN_FILENO, slave_path, true, false);
OpenPOWER on IntegriCloud