pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lldb-netbsd: Sync with patch sent upstream for ProcessLauncherPosixFork



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Feb 1 02:10:14 2017 +0100
Changeset:	937b1c476e6346bb74caf428e89b4d64b76117b6

Modified Files:
	lldb-netbsd/distinfo
	lldb-netbsd/patches/patch-source_Host_posix_ProcessLauncherPosixFork.cpp

Log Message:
lldb-netbsd: Sync with patch sent upstream for ProcessLauncherPosixFork

Reduce difference with the code pending upstream.

Sponsored by <The NetBSD Foundation>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=937b1c476e6346bb74caf428e89b4d64b76117b6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 lldb-netbsd/distinfo                               |  2 +-
 ...-source_Host_posix_ProcessLauncherPosixFork.cpp | 27 ++++------------------
 2 files changed, 5 insertions(+), 24 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 2efb94c..39cad21 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -33,7 +33,7 @@ SHA1 (patch-source_Host_linux_ProcessLauncherLinux.cpp) = 2f5bf0787feadb5bab39f4
 SHA1 (patch-source_Host_netbsd_HostThreadNetBSD.cpp) = a1b0fbdad062309a845cfefe4469614fbbe9d20e
 SHA1 (patch-source_Host_netbsd_ProcessLauncherNetBSD.cpp) = da39a3ee5e6b4b0d3255bfef95601890afd80709
 SHA1 (patch-source_Host_netbsd_ThisThread.cpp) = f0d32c81bc1b8fe9aeb86519ea46ba2cb16571c2
-SHA1 (patch-source_Host_posix_ProcessLauncherPosixFork.cpp) = dbd125082787187f946f2bcfa0d9279804985e06
+SHA1 (patch-source_Host_posix_ProcessLauncherPosixFork.cpp) = dbcff0f3784a7574e6e7c9047ca0ee31440580f0
 SHA1 (patch-source_Host_windows_HostInfoWindows.cpp) = 73be6130bfc54bde057c23eee23aecd09c200b8d
 SHA1 (patch-source_Initialization_SystemInitializerCommon.cpp) = 80c850b980fe2902f10e441df7a18f428dd1154a
 SHA1 (patch-source_Plugins_ExpressionParser_Clang_ClangModulesDeclVendor.cpp) = a7f61c10f28fdc3280fdd81b2719f014e854c4fa
diff --git a/lldb-netbsd/patches/patch-source_Host_posix_ProcessLauncherPosixFork.cpp b/lldb-netbsd/patches/patch-source_Host_posix_ProcessLauncherPosixFork.cpp
index 91c59ec..99c198e 100644
--- a/lldb-netbsd/patches/patch-source_Host_posix_ProcessLauncherPosixFork.cpp
+++ b/lldb-netbsd/patches/patch-source_Host_posix_ProcessLauncherPosixFork.cpp
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- source/Host/posix/ProcessLauncherPosixFork.cpp.orig	2017-01-31 22:19:11.628280905 +0000
 +++ source/Host/posix/ProcessLauncherPosixFork.cpp
-@@ -0,0 +1,250 @@
+@@ -0,0 +1,231 @@
 +//===-- ProcessLauncherLinux.cpp --------------------------------*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -77,26 +77,6 @@ $NetBSD$
 +#endif
 +}
 +
-+static int PtraceMe() {
-+#if defined(__linux__)
-+  return ptrace(PTRACE_TRACEME, 0, nullptr, nullptr);
-+#elif defined(__NetBSD__)
-+  return ptrace(PT_TRACE_ME, 0, nullptr, 0);
-+#else
-+#error portme
-+#endif
-+}
-+
-+static int SignalSetMask(const sigset_t *set) {
-+#if defined(__linux__)
-+  return pthread_sigmask(SIG_SETMASK, set, nullptr);
-+#elif defined(__NetBSD__)
-+  return sigprocmask(SIG_SETMASK, set, nullptr);
-+#else
-+#error portme
-+#endif
-+}
-+
 +static void DupDescriptor(int error_fd, const FileSpec &file_spec, int fd,
 +                          int flags) {
 +  int target_fd = ::open(file_spec.GetCString(), flags, 0666);
@@ -165,7 +145,8 @@ $NetBSD$
 +  // Clear the signal mask to prevent the child from being affected by
 +  // any masking done by the parent.
 +  sigset_t set;
-+  if (sigemptyset(&set) != 0 || SignalSetMask(&set) != 0)
++  if (sigemptyset(&set) != 0 ||
++      pthread_sigmask(SIG_SETMASK, &set, nullptr) != 0)
 +    ExitWithError(error_fd, "pthread_sigmask");
 +
 +  if (info.GetFlags().Test(eLaunchFlagDebug)) {
@@ -179,7 +160,7 @@ $NetBSD$
 +        close(fd);
 +
 +    // Start tracing this child that is about to exec.
-+    if (PtraceMe() == -1)
++    if (ptrace(PT_TRACE_ME, 0, nullptr, 0) == -1)
 +      ExitWithError(error_fd, "ptrace");
 +  }
 +


Home | Main Index | Thread Index | Old Index