pkgsrc-WIP-changes archive

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

lldb-netbsd: Adapt Detach function for NetBSD



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Dec 18 01:21:41 2016 +0100
Changeset:	ac978855a3ede2e813524be500c14ee3aa583fa0

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

Log Message:
lldb-netbsd: Adapt Detach function for NetBSD

Linux code is calling this ptrace(2) call for each thread, this is not needed
on NetBSD.

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=ac978855a3ede2e813524be500c14ee3aa583fa0

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

diffstat:
 lldb-netbsd/distinfo                                   |  2 +-
 ...urce_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 18 ++----------------
 2 files changed, 3 insertions(+), 17 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 6aa1acc..7615b54 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -18,7 +18,7 @@ SHA1 (patch-include_lldb_Host_netbsd_Ptrace.h) = 3ef61ded004c2acb81e132dc0e46d0a
 SHA1 (patch-source_CMakeLists.txt) = 5dacabc3f39c23bdfd432b5a4895866157b97aa0
 SHA1 (patch-source_Plugins_Process_CMakeLists.txt) = c0168f81da56d9896eb414e6b8bb7262de04ac33
 SHA1 (patch-source_Plugins_Process_NetBSD_CMakeLists.txt) = 8c1d8274523f6ef4bce90caa6c981160ef930cb9
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 1ef6b008f9db4dbc8791d17390fe470661acd1fc
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = fc7a9b974719ed107025d6c248b7c68843f39624
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = 11641e9c3a5fdf4d9feb098c9c0bb2d9e05aa274
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = cf569f95362538af5a2709aab9ff61770744a78d
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = 558e8514b2a8f0595c0e375f308c53d8a9a6e9f1
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
index 58335e6..ba22c24 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig	2016-12-17 13:23:23.782610208 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
-@@ -0,0 +1,1963 @@
+@@ -0,0 +1,1949 @@
 +//===-- NativeProcessNetBSD.cpp -------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -890,14 +890,7 @@ $NetBSD$
 +  if (GetID() == LLDB_INVALID_PROCESS_ID)
 +    return error;
 +
-+  for (auto thread_sp : m_threads) {
-+    Error e = Detach(thread_sp->GetID());
-+    if (e.Fail())
-+      error =
-+          e; // Save the error, but still attempt to detach from other threads.
-+  }
-+
-+  return error;
++  return PtraceWrapper(PT_DETACH, GetID());
 +}
 +
 +Error NativeProcessNetBSD::Signal(int signo) {
@@ -1520,13 +1513,6 @@ $NetBSD$
 +  return PtraceWrapper(PTRACE_GETEVENTMSG, tid, nullptr, message);
 +}
 +
-+Error NativeProcessNetBSD::Detach(lldb::tid_t tid) {
-+  if (tid == LLDB_INVALID_THREAD_ID)
-+    return Error();
-+
-+  return PtraceWrapper(PTRACE_DETACH, tid);
-+}
-+
 +bool NativeProcessNetBSD::HasThreadNoLock(lldb::tid_t thread_id) {
 +  for (auto thread_sp : m_threads) {
 +    assert(thread_sp && "thread list should not contain NULL threads");


Home | Main Index | Thread Index | Old Index