pkgsrc-WIP-changes archive

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

lldb-netbsd: Drop unused NativeProcessNetBSD::WaitForNewThread



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Dec 24 07:11:31 2016 +0100
Changeset:	e7fa627d3aaae6e4218e073fb3ecc0a9ee5a51b0

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

Log Message:
lldb-netbsd: Drop unused NativeProcessNetBSD::WaitForNewThread

This function is currently restricted to clone(2) handling on Linux.

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

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

diffstat:
 lldb-netbsd/distinfo                               |  4 +-
 ..._Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 57 +---------------------
 ...ce_Plugins_Process_NetBSD_NativeProcessNetBSD.h |  6 +--
 3 files changed, 5 insertions(+), 62 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 8fc20ac..aa2de7e 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -27,8 +27,8 @@ SHA1 (patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp) = 129e853c1f93f06
 SHA1 (patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.h) = 4327a21e79378b8f35adb07614adb41c37bbaf61
 SHA1 (patch-source_Plugins_Process_CMakeLists.txt) = c0168f81da56d9896eb414e6b8bb7262de04ac33
 SHA1 (patch-source_Plugins_Process_NetBSD_CMakeLists.txt) = df17afdf71c29d945c887e318718904793cd48ad
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 8e58ec3d08b144f310cf4769c7a35513868f63bb
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = f31a6c671d648f49a67e515706492420dcd75027
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 20b38115aebf62e2f0d4e2603c47b88a152a7112
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = cae599fa7e283bc9951988d9221fcc81b101000c
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = 5b5b01a16e95a9e187599d93b3f757104a5f3342
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = 02af2346f66460c51af6a1bb9d0fb514a4da9ef6
 SHA1 (patch-tools_lldb-mi_MICmnBase.cpp) = 851c82ac61e1241018755fbd7236af00379ac986
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 4fbff81..1ff1783 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-24 04:33:38.213380608 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
-@@ -0,0 +1,1652 @@
+@@ -0,0 +1,1597 @@
 +//===-- NativeProcessNetBSD.cpp -------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -482,61 +482,6 @@ $NetBSD$
 +  }
 +}
 +
-+void NativeProcessNetBSD::WaitForNewThread(::pid_t tid) {
-+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-+
-+  NativeThreadNetBSDSP new_thread_sp = GetThreadByID(tid);
-+
-+  if (new_thread_sp) {
-+    // We are already tracking the thread - we got the event on the new thread
-+    // (see
-+    // MonitorSignal) before this one. We are done.
-+    return;
-+  }
-+
-+  // The thread is not tracked yet, let's wait for it to appear.
-+  int status = -1;
-+  ::pid_t wait_pid;
-+  do {
-+    if (log)
-+      log->Printf("NativeProcessNetBSD::%s() received thread creation event for "
-+                  "tid %" PRIu32
-+                  ". tid not tracked yet, waiting for thread to appear...",
-+                  __FUNCTION__, tid);
-+    wait_pid = waitpid(tid, &status, WALLSIG);
-+  } while (wait_pid == -1 && errno == EINTR);
-+  // Since we are waiting on a specific tid, this must be the creation event.
-+  // But let's do
-+  // some checks just in case.
-+  if (wait_pid != tid) {
-+    if (log)
-+      log->Printf(
-+          "NativeProcessNetBSD::%s() waiting for tid %" PRIu32
-+          " failed. Assuming the thread has disappeared in the meantime",
-+          __FUNCTION__, tid);
-+    // The only way I know of this could happen is if the whole process was
-+    // SIGKILLed in the mean time. In any case, we can't do anything about that
-+    // now.
-+    return;
-+  }
-+  if (WIFEXITED(status)) {
-+    if (log)
-+      log->Printf("NativeProcessNetBSD::%s() waiting for tid %" PRIu32
-+                  " returned an 'exited' event. Not tracking the thread.",
-+                  __FUNCTION__, tid);
-+    // Also a very improbable event.
-+    return;
-+  }
-+
-+  if (log)
-+    log->Printf("NativeProcessNetBSD::%s() pid = %" PRIu64
-+                ": tracking new thread tid %" PRIu32,
-+                __FUNCTION__, GetID(), tid);
-+
-+  new_thread_sp = AddThread(tid);
-+  /* XXX: ResumeThread */
-+}
-+
 +namespace {
 +
 +struct EmulatorBaton {
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
index 74ac1a3..08b761c 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- source/Plugins/Process/NetBSD/NativeProcessNetBSD.h.orig	2016-12-21 17:21:58.161130776 +0000
+--- source/Plugins/Process/NetBSD/NativeProcessNetBSD.h.orig	2016-12-24 04:33:38.220266609 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
-@@ -0,0 +1,182 @@
+@@ -0,0 +1,180 @@
 +//===-- NativeProcessNetBSD.h ---------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -146,8 +146,6 @@ $NetBSD$
 +
 +  void MonitorCallback(lldb::pid_t pid, bool exited, int signal, int status);
 +
-+  void WaitForNewThread(::pid_t tid);
-+
 +  void MonitorSIGTRAP(const siginfo_t &info, NativeThreadNetBSD &thread);
 +
 +  Error SetupSoftwareSingleStepping(NativeThreadNetBSD &thread);


Home | Main Index | Thread Index | Old Index