summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
Diffstat (limited to 'lldb')
-rw-r--r--lldb/include/lldb/Host/PseudoTerminal.h6
-rw-r--r--lldb/include/lldb/Target/ProcessLaunchInfo.h4
-rw-r--r--lldb/source/Host/common/PseudoTerminal.cpp2
-rw-r--r--lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp2
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp2
-rw-r--r--lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp2
-rw-r--r--lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp2
-rw-r--r--lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp5
-rw-r--r--lldb/source/Target/Platform.cpp2
-rw-r--r--lldb/source/Target/ProcessLaunchInfo.cpp14
-rw-r--r--lldb/unittests/Editline/EditlineTest.cpp4
-rw-r--r--lldb/unittests/Host/MainLoopTest.cpp2
13 files changed, 23 insertions, 26 deletions
diff --git a/lldb/include/lldb/Host/PseudoTerminal.h b/lldb/include/lldb/Host/PseudoTerminal.h
index fdbf6df1a18..00c0da6f331 100644
--- a/lldb/include/lldb/Host/PseudoTerminal.h
+++ b/lldb/include/lldb/Host/PseudoTerminal.h
@@ -9,14 +9,13 @@
#ifndef LLDB_HOST_PSEUDOTERMINAL_H
#define LLDB_HOST_PSEUDOTERMINAL_H
-#if defined(__cplusplus)
#include <fcntl.h>
#include <string>
#include "lldb/lldb-defines.h"
-namespace lldb_utility {
+namespace lldb_private {
//----------------------------------------------------------------------
/// @class PseudoTerminal PseudoTerminal.h "lldb/Host/PseudoTerminal.h"
@@ -246,7 +245,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(PseudoTerminal);
};
-} // namespace lldb_utility
+} // namespace lldb_private
-#endif // #if defined(__cplusplus)
#endif // #ifndef liblldb_PseudoTerminal_h_
diff --git a/lldb/include/lldb/Target/ProcessLaunchInfo.h b/lldb/include/lldb/Target/ProcessLaunchInfo.h
index 93a1a9ebd23..fc715f28544 100644
--- a/lldb/include/lldb/Target/ProcessLaunchInfo.h
+++ b/lldb/include/lldb/Target/ProcessLaunchInfo.h
@@ -117,7 +117,7 @@ public:
bool MonitorProcess() const;
- lldb_utility::PseudoTerminal &GetPTY() { return *m_pty; }
+ PseudoTerminal &GetPTY() { return *m_pty; }
// Get and set the actual listener that will be used for the process events
lldb::ListenerSP GetListener() const { return m_listener_sp; }
@@ -150,7 +150,7 @@ protected:
FileSpec m_shell;
Flags m_flags; // Bitwise OR of bits from lldb::LaunchFlags
std::vector<FileAction> m_file_actions; // File actions for any other files
- std::shared_ptr<lldb_utility::PseudoTerminal> m_pty;
+ std::shared_ptr<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/Host/common/PseudoTerminal.cpp b/lldb/source/Host/common/PseudoTerminal.cpp
index 58c32e4a1c4..9657cb6523d 100644
--- a/lldb/source/Host/common/PseudoTerminal.cpp
+++ b/lldb/source/Host/common/PseudoTerminal.cpp
@@ -24,7 +24,7 @@
int posix_openpt(int flags);
#endif
-using namespace lldb_utility;
+using namespace lldb_private;
//----------------------------------------------------------------------
// PseudoTerminal constructor
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
index e26cdcd32aa..8186eae0e8c 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -372,7 +372,7 @@ PlatformLinux::DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
// Hook up process PTY if we have one (which we should for local debugging
// with llgs).
int pty_fd = launch_info.GetPTY().ReleaseMasterFileDescriptor();
- if (pty_fd != lldb_utility::PseudoTerminal::invalid_fd) {
+ if (pty_fd != PseudoTerminal::invalid_fd) {
process_sp->SetSTDIOFileDescriptor(pty_fd);
LLDB_LOG(log, "hooked up STDIO pty to process");
} else
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
index 0197d27e76e..a216e3839dd 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
@@ -206,7 +206,7 @@ lldb::ProcessSP PlatformAppleSimulator::DebugProcess(
// open for stdin/out/err after we have already opened the master
// so we can read/write stdin/out/err.
int pty_fd = launch_info.GetPTY().ReleaseMasterFileDescriptor();
- if (pty_fd != lldb_utility::PseudoTerminal::invalid_fd) {
+ if (pty_fd != PseudoTerminal::invalid_fd) {
process_sp->SetSTDIOFileDescriptor(pty_fd);
}
}
diff --git a/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp b/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
index 28ff117cdf5..38bdf60c1ce 100644
--- a/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
+++ b/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
@@ -393,7 +393,7 @@ lldb::ProcessSP PlatformNetBSD::DebugProcess(
// Hook up process PTY if we have one (which we should for local debugging
// with llgs).
int pty_fd = launch_info.GetPTY().ReleaseMasterFileDescriptor();
- if (pty_fd != lldb_utility::PseudoTerminal::invalid_fd) {
+ if (pty_fd != PseudoTerminal::invalid_fd) {
process_sp->SetSTDIOFileDescriptor(pty_fd);
if (log)
log->Printf("PlatformNetBSD::%s pid %" PRIu64
diff --git a/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp b/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
index c6daf6ccea6..6b3d5f6c117 100644
--- a/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
+++ b/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
@@ -144,7 +144,7 @@ static Status ForkChildForPTraceDebugging(const char *path, char const *argv[],
// Use a fork that ties the child process's stdin/out/err to a pseudo
// terminal so we can read it in our MachProcess::STDIOThread
// as unbuffered io.
- lldb_utility::PseudoTerminal pty;
+ PseudoTerminal pty;
char fork_error[256];
memset(fork_error, 0, sizeof(fork_error));
*pid = static_cast<::pid_t>(pty.Fork(fork_error, sizeof(fork_error)));
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
index 6291d09765c..bd06fa25f0a 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
@@ -843,7 +843,7 @@ bool ProcessMonitor::Launch(LaunchArgs *args) {
const FileSpec &stderr_file_spec = args->m_stderr_file_spec;
const FileSpec &working_dir = args->m_working_dir;
- lldb_utility::PseudoTerminal terminal;
+ PseudoTerminal terminal;
const size_t err_len = 1024;
char err_str[err_len];
::pid_t pid;
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 5b2d084a0d3..35d02c15ab8 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -817,7 +817,7 @@ Status ProcessGDBRemote::DoLaunch(Module *exe_module,
if (object_file) {
error = EstablishConnectionIfNeeded(launch_info);
if (error.Success()) {
- lldb_utility::PseudoTerminal pty;
+ PseudoTerminal pty;
const bool disable_stdio = (launch_flags & eLaunchFlagDisableSTDIO) != 0;
PlatformSP platform_sp(GetTarget().GetPlatform());
@@ -946,8 +946,7 @@ Status ProcessGDBRemote::DoLaunch(Module *exe_module,
SetPrivateState(SetThreadStopInfo(response));
if (!disable_stdio) {
- if (pty.GetMasterFileDescriptor() !=
- lldb_utility::PseudoTerminal::invalid_fd)
+ if (pty.GetMasterFileDescriptor() != PseudoTerminal::invalid_fd)
SetSTDIOFileDescriptor(pty.ReleaseMasterFileDescriptor());
}
}
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index 25aa7159122..5d60bb79155 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -1196,7 +1196,7 @@ Platform::DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
// open for stdin/out/err after we have already opened the master
// so we can read/write stdin/out/err.
int pty_fd = launch_info.GetPTY().ReleaseMasterFileDescriptor();
- if (pty_fd != lldb_utility::PseudoTerminal::invalid_fd) {
+ if (pty_fd != PseudoTerminal::invalid_fd) {
process_sp->SetSTDIOFileDescriptor(pty_fd);
}
} else {
diff --git a/lldb/source/Target/ProcessLaunchInfo.cpp b/lldb/source/Target/ProcessLaunchInfo.cpp
index 3fa40dcc5ca..284df9fd8b5 100644
--- a/lldb/source/Target/ProcessLaunchInfo.cpp
+++ b/lldb/source/Target/ProcessLaunchInfo.cpp
@@ -39,10 +39,9 @@ using namespace lldb_private;
ProcessLaunchInfo::ProcessLaunchInfo()
: ProcessInfo(), m_working_dir(), m_plugin_name(), m_flags(0),
- m_file_actions(), m_pty(new lldb_utility::PseudoTerminal),
- m_resume_count(0), m_monitor_callback(nullptr),
- m_monitor_callback_baton(nullptr), m_monitor_signals(false),
- m_listener_sp(), m_hijack_listener_sp() {}
+ m_file_actions(), m_pty(new PseudoTerminal), m_resume_count(0),
+ m_monitor_callback(nullptr), m_monitor_callback_baton(nullptr),
+ m_monitor_signals(false), m_listener_sp(), m_hijack_listener_sp() {}
ProcessLaunchInfo::ProcessLaunchInfo(const FileSpec &stdin_file_spec,
const FileSpec &stdout_file_spec,
@@ -50,10 +49,9 @@ ProcessLaunchInfo::ProcessLaunchInfo(const FileSpec &stdin_file_spec,
const FileSpec &working_directory,
uint32_t launch_flags)
: ProcessInfo(), m_working_dir(), m_plugin_name(), m_flags(launch_flags),
- m_file_actions(), m_pty(new lldb_utility::PseudoTerminal),
- m_resume_count(0), m_monitor_callback(nullptr),
- m_monitor_callback_baton(nullptr), m_monitor_signals(false),
- m_listener_sp(), m_hijack_listener_sp() {
+ m_file_actions(), m_pty(new PseudoTerminal), m_resume_count(0),
+ m_monitor_callback(nullptr), m_monitor_callback_baton(nullptr),
+ m_monitor_signals(false), m_listener_sp(), m_hijack_listener_sp() {
if (stdin_file_spec) {
FileAction file_action;
const bool read = true;
diff --git a/lldb/unittests/Editline/EditlineTest.cpp b/lldb/unittests/Editline/EditlineTest.cpp
index 668d1f54212..963d9043e99 100644
--- a/lldb/unittests/Editline/EditlineTest.cpp
+++ b/lldb/unittests/Editline/EditlineTest.cpp
@@ -25,6 +25,8 @@
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StringList.h"
+using namespace lldb_private;
+
namespace {
const size_t TIMEOUT_MILLIS = 5000;
}
@@ -81,7 +83,7 @@ private:
std::unique_ptr<lldb_private::Editline> _editline_sp;
- lldb_utility::PseudoTerminal _pty;
+ PseudoTerminal _pty;
int _pty_master_fd;
int _pty_slave_fd;
diff --git a/lldb/unittests/Host/MainLoopTest.cpp b/lldb/unittests/Host/MainLoopTest.cpp
index ee73f23d1a3..8f2c55c2416 100644
--- a/lldb/unittests/Host/MainLoopTest.cpp
+++ b/lldb/unittests/Host/MainLoopTest.cpp
@@ -110,7 +110,7 @@ TEST_F(MainLoopTest, TerminatesImmediately) {
#ifdef LLVM_ON_UNIX
TEST_F(MainLoopTest, DetectsEOF) {
- lldb_utility::PseudoTerminal term;
+ PseudoTerminal term;
ASSERT_TRUE(term.OpenFirstAvailableMaster(O_RDWR, nullptr, 0));
ASSERT_TRUE(term.OpenSlave(O_RDWR | O_NOCTTY, nullptr, 0));
auto conn = llvm::make_unique<ConnectionFileDescriptor>(
OpenPOWER on IntegriCloud