diff options
author | Kamil Rytarowski <n54@gmx.com> | 2017-02-01 14:30:40 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2017-02-01 14:30:40 +0000 |
commit | 816ae4b0dfac9a2bd964e8c4dae6dd7183ceb92a (patch) | |
tree | c8d8e9c8520fd3ddebf3f7c3435e0ea8a1e64288 /lldb/source/Host/common/Host.cpp | |
parent | 79d58a39d1df8c216ef658bbbd508c9103b73d9f (diff) | |
download | bcm5719-llvm-816ae4b0dfac9a2bd964e8c4dae6dd7183ceb92a.tar.gz bcm5719-llvm-816ae4b0dfac9a2bd964e8c4dae6dd7183ceb92a.zip |
Transform ProcessLauncherLinux to ProcessLauncherPosixFork
Summary:
Use ProcessLauncherPosixFork in Linux and NetBSD.
Changes to ProcessLauncherLinux:
- Limit personality.h and ASLR code to Linux.
- Reuse portable ptrace(2) PT_TRACE_ME operation available on Linux and BSDs.
- Limit ETXTBSY error path from execve(2) to Linux.
- In LaunchProcess declaration change virtual to override.
This code should be readily available for FreeBSD.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, clayborg, labath, emaste
Reviewed By: labath
Subscribers: danalbert, srhines, mgorny, #lldb
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D29347
llvm-svn: 293768
Diffstat (limited to 'lldb/source/Host/common/Host.cpp')
-rw-r--r-- | lldb/source/Host/common/Host.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index 504f0bc2a89..e77c14e1037 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -71,8 +71,8 @@ #if defined(_WIN32) #include "lldb/Host/windows/ProcessLauncherWindows.h" -#elif defined(__linux__) -#include "lldb/Host/linux/ProcessLauncherLinux.h" +#elif defined(__linux__) || defined(__NetBSD__) +#include "lldb/Host/posix/ProcessLauncherPosixFork.h" #else #include "lldb/Host/posix/ProcessLauncherPosix.h" #endif @@ -975,8 +975,8 @@ Error Host::LaunchProcess(ProcessLaunchInfo &launch_info) { std::unique_ptr<ProcessLauncher> delegate_launcher; #if defined(_WIN32) delegate_launcher.reset(new ProcessLauncherWindows()); -#elif defined(__linux__) - delegate_launcher.reset(new ProcessLauncherLinux()); +#elif defined(__linux__) || defined(__NetBSD__) + delegate_launcher.reset(new ProcessLauncherPosixFork()); #else delegate_launcher.reset(new ProcessLauncherPosix()); #endif |