summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/include/lldb/Host/FileAction.h (renamed from lldb/include/lldb/Target/FileAction.h)4
-rw-r--r--lldb/include/lldb/Host/ProcessInfo.h (renamed from lldb/include/lldb/Target/ProcessInfo.h)0
-rw-r--r--lldb/include/lldb/Host/ProcessLaunchInfo.h (renamed from lldb/include/lldb/Target/ProcessLaunchInfo.h)4
-rw-r--r--lldb/include/lldb/Target/Process.h4
-rw-r--r--lldb/include/lldb/Target/Target.h2
-rw-r--r--lldb/include/lldb/module.modulemap3
-rw-r--r--lldb/source/API/SBLaunchInfo.cpp2
-rw-r--r--lldb/source/Host/CMakeLists.txt3
-rw-r--r--lldb/source/Host/common/FileAction.cpp (renamed from lldb/source/Target/FileAction.cpp)2
-rw-r--r--lldb/source/Host/common/Host.cpp4
-rw-r--r--lldb/source/Host/common/MonitoringProcessLauncher.cpp2
-rw-r--r--lldb/source/Host/common/ProcessInfo.cpp (renamed from lldb/source/Target/ProcessInfo.cpp)2
-rw-r--r--lldb/source/Host/common/ProcessLaunchInfo.cpp (renamed from lldb/source/Target/ProcessLaunchInfo.cpp)4
-rw-r--r--lldb/source/Host/macosx/objcxx/Host.mm2
-rw-r--r--lldb/source/Host/posix/ProcessLauncherPosixFork.cpp2
-rw-r--r--lldb/source/Host/windows/ProcessLauncherWindows.cpp2
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm2
-rw-r--r--lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp3
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp2
-rw-r--r--lldb/source/Target/CMakeLists.txt3
-rw-r--r--lldb/unittests/Host/CMakeLists.txt3
-rw-r--r--lldb/unittests/Host/FileActionTest.cpp20
-rw-r--r--lldb/unittests/Host/ProcessInfoTest.cpp20
-rw-r--r--lldb/unittests/Host/ProcessLaunchInfoTest.cpp28
-rw-r--r--lldb/unittests/tools/lldb-server/tests/TestClient.cpp1
-rw-r--r--lldb/unittests/tools/lldb-server/tests/TestClient.h2
29 files changed, 102 insertions, 30 deletions
diff --git a/lldb/include/lldb/Target/FileAction.h b/lldb/include/lldb/Host/FileAction.h
index fc5abb19a4c..4d333bb327a 100644
--- a/lldb/include/lldb/Target/FileAction.h
+++ b/lldb/include/lldb/Host/FileAction.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef liblldb_Target_FileAction_h
-#define liblldb_Target_FileAction_h
+#ifndef LLDB_HOST_FILEACTION_H
+#define LLDB_HOST_FILEACTION_H
#include "lldb/Utility/FileSpec.h"
#include <string>
diff --git a/lldb/include/lldb/Target/ProcessInfo.h b/lldb/include/lldb/Host/ProcessInfo.h
index 818e29ef357..818e29ef357 100644
--- a/lldb/include/lldb/Target/ProcessInfo.h
+++ b/lldb/include/lldb/Host/ProcessInfo.h
diff --git a/lldb/include/lldb/Target/ProcessLaunchInfo.h b/lldb/include/lldb/Host/ProcessLaunchInfo.h
index 87ebe336887..6c1419a792c 100644
--- a/lldb/include/lldb/Target/ProcessLaunchInfo.h
+++ b/lldb/include/lldb/Host/ProcessLaunchInfo.h
@@ -15,10 +15,10 @@
// LLDB Headers
#include "lldb/Utility/Flags.h"
+#include "lldb/Host/FileAction.h"
#include "lldb/Host/Host.h"
+#include "lldb/Host/ProcessInfo.h"
#include "lldb/Host/PseudoTerminal.h"
-#include "lldb/Target/FileAction.h"
-#include "lldb/Target/ProcessInfo.h"
#include "lldb/Utility/FileSpec.h"
namespace lldb_private {
diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index 0be1548f477..9d46485220b 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -28,14 +28,14 @@
#include "lldb/Core/ThreadSafeValue.h"
#include "lldb/Core/UserSettingsController.h"
#include "lldb/Host/HostThread.h"
+#include "lldb/Host/ProcessInfo.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Host/ProcessRunLock.h"
#include "lldb/Interpreter/Options.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/ExecutionContextScope.h"
#include "lldb/Target/InstrumentationRuntime.h"
#include "lldb/Target/Memory.h"
-#include "lldb/Target/ProcessInfo.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Target/QueueList.h"
#include "lldb/Target/ThreadList.h"
#include "lldb/Utility/ArchSpec.h"
diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h
index f86a2625709..adc479574d9 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -23,10 +23,10 @@
#include "lldb/Core/ModuleList.h"
#include "lldb/Core/UserSettingsController.h"
#include "lldb/Expression/Expression.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Symbol/TypeSystem.h"
#include "lldb/Target/ExecutionContextScope.h"
#include "lldb/Target/PathMappingList.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Target/SectionLoadHistory.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/Broadcaster.h"
diff --git a/lldb/include/lldb/module.modulemap b/lldb/include/lldb/module.modulemap
index 9c7f3e6f58e..922a4495cdb 100644
--- a/lldb/include/lldb/module.modulemap
+++ b/lldb/include/lldb/module.modulemap
@@ -17,6 +17,7 @@ module lldb_Host {
module Editline { header "Host/Editline.h" export * }
module FileCache { header "Host/FileCache.h" export * }
module File { header "Host/File.h" export * }
+ module FileAction { header "Host/FileAction.h" export * }
module FileSystem { header "Host/FileSystem.h" export * }
module HostGetOpt { header "Host/HostGetOpt.h" export * }
module Host { header "Host/Host.h" export * }
@@ -38,7 +39,9 @@ module lldb_Host {
module PipeBase { header "Host/PipeBase.h" export * }
module Pipe { header "Host/Pipe.h" export * }
module PosixApi { header "Host/PosixApi.h" export * }
+ module ProcessInfo { header "Host/ProcessInfo.h" export * }
module ProcessLauncher { header "Host/ProcessLauncher.h" export * }
+ module ProcessLaunchInfo { header "Host/ProcessLaunchInfo.h" export * }
module ProcessRunLock { header "Host/ProcessRunLock.h" export * }
module PseudoTerminal { header "Host/PseudoTerminal.h" export * }
module SafeMachO { header "Host/SafeMachO.h" export * }
diff --git a/lldb/source/API/SBLaunchInfo.cpp b/lldb/source/API/SBLaunchInfo.cpp
index 1063f55598c..3d27887081d 100644
--- a/lldb/source/API/SBLaunchInfo.cpp
+++ b/lldb/source/API/SBLaunchInfo.cpp
@@ -10,7 +10,7 @@
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBListener.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
using namespace lldb;
using namespace lldb_private;
diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt
index 333f109a9a2..0ae241d4421 100644
--- a/lldb/source/Host/CMakeLists.txt
+++ b/lldb/source/Host/CMakeLists.txt
@@ -19,6 +19,7 @@ endmacro()
add_host_subdirectory(common
common/File.cpp
+ common/FileAction.cpp
common/FileCache.cpp
common/FileSystem.cpp
common/GetOptInc.cpp
@@ -36,6 +37,8 @@ add_host_subdirectory(common
common/NativeThreadProtocol.cpp
common/OptionParser.cpp
common/PipeBase.cpp
+ common/ProcessInfo.cpp
+ common/ProcessLaunchInfo.cpp
common/ProcessRunLock.cpp
common/PseudoTerminal.cpp
common/Socket.cpp
diff --git a/lldb/source/Target/FileAction.cpp b/lldb/source/Host/common/FileAction.cpp
index c8c0af0ac38..97367049abb 100644
--- a/lldb/source/Target/FileAction.cpp
+++ b/lldb/source/Host/common/FileAction.cpp
@@ -8,8 +8,8 @@
#include <fcntl.h>
+#include "lldb/Host/FileAction.h"
#include "lldb/Host/PosixApi.h"
-#include "lldb/Target/FileAction.h"
#include "lldb/Utility/Stream.h"
using namespace lldb_private;
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index 4e9b3ac2d40..acdb92d4993 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -46,16 +46,16 @@
#include <csignal>
+#include "lldb/Host/FileAction.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Host/HostProcess.h"
#include "lldb/Host/MonitoringProcessLauncher.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Host/ProcessLauncher.h"
#include "lldb/Host/ThreadLauncher.h"
#include "lldb/Host/posix/ConnectionFileDescriptorPosix.h"
-#include "lldb/Target/FileAction.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Target/UnixSignals.h"
#include "lldb/Utility/DataBufferLLVM.h"
#include "lldb/Utility/FileSpec.h"
diff --git a/lldb/source/Host/common/MonitoringProcessLauncher.cpp b/lldb/source/Host/common/MonitoringProcessLauncher.cpp
index 285182a82cb..2ee69353e19 100644
--- a/lldb/source/Host/common/MonitoringProcessLauncher.cpp
+++ b/lldb/source/Host/common/MonitoringProcessLauncher.cpp
@@ -9,7 +9,7 @@
#include "lldb/Host/MonitoringProcessLauncher.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostProcess.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Utility/Log.h"
#include "llvm/Support/FileSystem.h"
diff --git a/lldb/source/Target/ProcessInfo.cpp b/lldb/source/Host/common/ProcessInfo.cpp
index 65aec34d0b4..76f521bebb5 100644
--- a/lldb/source/Target/ProcessInfo.cpp
+++ b/lldb/source/Host/common/ProcessInfo.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "lldb/Target/ProcessInfo.h"
+#include "lldb/Host/ProcessInfo.h"
#include <climits>
diff --git a/lldb/source/Target/ProcessLaunchInfo.cpp b/lldb/source/Host/common/ProcessLaunchInfo.cpp
index f9d0b78cacc..443f00e65af 100644
--- a/lldb/source/Target/ProcessLaunchInfo.cpp
+++ b/lldb/source/Host/common/ProcessLaunchInfo.cpp
@@ -9,10 +9,10 @@
#include <climits>
#include "lldb/Host/Config.h"
+#include "lldb/Host/FileAction.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
-#include "lldb/Target/FileAction.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"
diff --git a/lldb/source/Host/macosx/objcxx/Host.mm b/lldb/source/Host/macosx/objcxx/Host.mm
index 3ebfc0c53c4..94a0a5b25b9 100644
--- a/lldb/source/Host/macosx/objcxx/Host.mm
+++ b/lldb/source/Host/macosx/objcxx/Host.mm
@@ -56,9 +56,9 @@
#include "lldb/Host/ConnectionFileDescriptor.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Host/ThreadLauncher.h"
#include "lldb/Target/Process.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/CleanUp.h"
#include "lldb/Utility/DataBufferHeap.h"
diff --git a/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp b/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
index bc1ac78f699..3edb4861a2f 100644
--- a/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
+++ b/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
@@ -10,7 +10,7 @@
#include "lldb/Host/Host.h"
#include "lldb/Host/HostProcess.h"
#include "lldb/Host/Pipe.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/Log.h"
#include "llvm/Support/Errno.h"
diff --git a/lldb/source/Host/windows/ProcessLauncherWindows.cpp b/lldb/source/Host/windows/ProcessLauncherWindows.cpp
index b66dff9d11d..2f540547c7c 100644
--- a/lldb/source/Host/windows/ProcessLauncherWindows.cpp
+++ b/lldb/source/Host/windows/ProcessLauncherWindows.cpp
@@ -8,7 +8,7 @@
#include "lldb/Host/windows/ProcessLauncherWindows.h"
#include "lldb/Host/HostProcess.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/ConvertUTF.h"
diff --git a/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm b/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
index a172c9d7067..ed18a1cb756 100644
--- a/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ b/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -16,7 +16,7 @@
#include <Foundation/Foundation.h>
// Project includes
#include "lldb/Host/PseudoTerminal.h"
-#include "lldb/Target/FileAction.h"
+#include "lldb/Host/FileAction.h"
#include "llvm/ADT/StringRef.h"
diff --git a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
index a28a73230e2..27fd0747829 100644
--- a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
+++ b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
@@ -8,7 +8,6 @@
#include "PlatformPOSIX.h"
-
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
@@ -22,11 +21,11 @@
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Target/DynamicLoader.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Process.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/CleanUp.h"
#include "lldb/Utility/DataBufferHeap.h"
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index 422fdeb59a1..5f41b43ae37 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -23,6 +23,7 @@
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostProcess.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Host/PseudoTerminal.h"
#include "lldb/Host/ThreadLauncher.h"
#include "lldb/Host/common/NativeRegisterContext.h"
@@ -31,7 +32,6 @@
#include "lldb/Host/posix/ProcessLauncherPosixFork.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/Process.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/LLDBAssert.h"
#include "lldb/Utility/RegisterValue.h"
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
index 276ca65e862..af5e66c22db 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
@@ -21,13 +21,13 @@
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Host/Config.h"
#include "lldb/Host/File.h"
+#include "lldb/Host/FileAction.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Host/SafeMachO.h"
#include "lldb/Interpreter/OptionArgParser.h"
#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Target/FileAction.h"
#include "lldb/Target/Platform.h"
#include "lldb/Target/Process.h"
#include "lldb/Utility/Endian.h"
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 4b618153f98..857f428d7b7 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -20,6 +20,7 @@
#include "lldb/Host/ConnectionFileDescriptor.h"
#include "lldb/Host/Debug.h"
#include "lldb/Host/File.h"
+#include "lldb/Host/FileAction.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
@@ -27,7 +28,6 @@
#include "lldb/Host/common/NativeProcessProtocol.h"
#include "lldb/Host/common/NativeRegisterContext.h"
#include "lldb/Host/common/NativeThreadProtocol.h"
-#include "lldb/Target/FileAction.h"
#include "lldb/Target/MemoryRegionInfo.h"
#include "lldb/Utility/Args.h"
#include "lldb/Utility/DataBuffer.h"
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
index 3c07f509dc8..08aa015e62c 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
@@ -21,9 +21,9 @@
#include "lldb/Host/Config.h"
#include "lldb/Host/ConnectionFileDescriptor.h"
+#include "lldb/Host/FileAction.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
-#include "lldb/Target/FileAction.h"
#include "lldb/Target/Platform.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/UnixSignals.h"
diff --git a/lldb/source/Target/CMakeLists.txt b/lldb/source/Target/CMakeLists.txt
index 265b3a80779..b1bbbc46905 100644
--- a/lldb/source/Target/CMakeLists.txt
+++ b/lldb/source/Target/CMakeLists.txt
@@ -2,7 +2,6 @@ add_lldb_library(lldbTarget
ABI.cpp
CPPLanguageRuntime.cpp
ExecutionContext.cpp
- FileAction.cpp
JITLoader.cpp
JITLoaderList.cpp
InstrumentationRuntime.cpp
@@ -17,8 +16,6 @@ add_lldb_library(lldbTarget
PathMappingList.cpp
Platform.cpp
Process.cpp
- ProcessInfo.cpp
- ProcessLaunchInfo.cpp
Queue.cpp
QueueItem.cpp
QueueList.cpp
diff --git a/lldb/unittests/Host/CMakeLists.txt b/lldb/unittests/Host/CMakeLists.txt
index 93394661d36..fe82ac95cf4 100644
--- a/lldb/unittests/Host/CMakeLists.txt
+++ b/lldb/unittests/Host/CMakeLists.txt
@@ -1,9 +1,12 @@
set (FILES
+ FileActionTest.cpp
FileSystemTest.cpp
HostInfoTest.cpp
HostTest.cpp
MainLoopTest.cpp
NativeProcessProtocolTest.cpp
+ ProcessInfoTest.cpp
+ ProcessLaunchInfoTest.cpp
SocketAddressTest.cpp
SocketTest.cpp
SymbolsTest.cpp
diff --git a/lldb/unittests/Host/FileActionTest.cpp b/lldb/unittests/Host/FileActionTest.cpp
new file mode 100644
index 00000000000..abe4408427c
--- /dev/null
+++ b/lldb/unittests/Host/FileActionTest.cpp
@@ -0,0 +1,20 @@
+//===-- FileActionTest.cpp --------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Host/FileAction.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+
+TEST(FileActionTest, Open) {
+ FileAction Action;
+ Action.Open(47, FileSpec("/tmp"), /*read*/ true, /*write*/ false);
+ EXPECT_EQ(Action.GetAction(), FileAction::eFileActionOpen);
+ EXPECT_EQ(Action.GetFileSpec(), FileSpec("/tmp"));
+}
diff --git a/lldb/unittests/Host/ProcessInfoTest.cpp b/lldb/unittests/Host/ProcessInfoTest.cpp
new file mode 100644
index 00000000000..ad6341aebf4
--- /dev/null
+++ b/lldb/unittests/Host/ProcessInfoTest.cpp
@@ -0,0 +1,20 @@
+//===-- ProcessInfoTest.cpp -------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Host/ProcessInfo.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+
+TEST(ProcessInfoTest, Constructor) {
+ ProcessInfo Info("foo", ArchSpec("x86_64-pc-linux"), 47);
+ EXPECT_STREQ("foo", Info.GetName());
+ EXPECT_EQ(ArchSpec("x86_64-pc-linux"), Info.GetArchitecture());
+ EXPECT_EQ(47, Info.GetProcessID());
+}
diff --git a/lldb/unittests/Host/ProcessLaunchInfoTest.cpp b/lldb/unittests/Host/ProcessLaunchInfoTest.cpp
new file mode 100644
index 00000000000..8a42265453b
--- /dev/null
+++ b/lldb/unittests/Host/ProcessLaunchInfoTest.cpp
@@ -0,0 +1,28 @@
+//===-- ProcessLaunchInfoTest.cpp -------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Host/ProcessLaunchInfo.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+using namespace lldb;
+
+TEST(ProcessLaunchInfoTest, Constructor) {
+ ProcessLaunchInfo Info(FileSpec("/stdin"), FileSpec("/stdout"),
+ FileSpec("/stderr"), FileSpec("/wd"),
+ eLaunchFlagStopAtEntry);
+ EXPECT_EQ(FileSpec("/stdin"),
+ Info.GetFileActionForFD(STDIN_FILENO)->GetFileSpec());
+ EXPECT_EQ(FileSpec("/stdout"),
+ Info.GetFileActionForFD(STDOUT_FILENO)->GetFileSpec());
+ EXPECT_EQ(FileSpec("/stderr"),
+ Info.GetFileActionForFD(STDERR_FILENO)->GetFileSpec());
+ EXPECT_EQ(FileSpec("/wd"), Info.GetWorkingDirectory());
+ EXPECT_EQ(eLaunchFlagStopAtEntry, Info.GetFlags().Get());
+}
diff --git a/lldb/unittests/tools/lldb-server/tests/TestClient.cpp b/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
index 3fea70b8f5a..ff75b07759f 100644
--- a/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
+++ b/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
@@ -10,7 +10,6 @@
#include "lldb/Host/HostInfo.h"
#include "lldb/Host/common/TCPSocket.h"
#include "lldb/Host/posix/ConnectionFileDescriptorPosix.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Utility/Args.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Path.h"
diff --git a/lldb/unittests/tools/lldb-server/tests/TestClient.h b/lldb/unittests/tools/lldb-server/tests/TestClient.h
index b3f89887c43..3016d370307 100644
--- a/lldb/unittests/tools/lldb-server/tests/TestClient.h
+++ b/lldb/unittests/tools/lldb-server/tests/TestClient.h
@@ -11,7 +11,7 @@
#include "MessageObjects.h"
#include "Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/Connection.h"
#include "llvm/ADT/Optional.h"
OpenPOWER on IntegriCloud