pkgsrc-WIP-changes archive

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

lldb-netbsd: Retire NativeProcessNetBSD::StopTrackingThread()



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Dec 21 19:17:27 2016 +0100
Changeset:	03418e25028342c1d940c7887883f2a9338425d2

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: Retire NativeProcessNetBSD::StopTrackingThread()

NetBSD doesn't perform tracking per-thread, but per-process.

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=03418e25028342c1d940c7887883f2a9338425d2

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 | 41 ++++------------------
 ...ce_Plugins_Process_NetBSD_NativeProcessNetBSD.h |  6 ++--
 3 files changed, 11 insertions(+), 40 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 19569ad..5664772 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) = e421cd8134e4fbf735661bc1d92139571d173c59
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = 3b15e8b5c4240846dbe1a5ef38b02da0c1299a85
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = e4e8cbfa5f3ade0dcb7b9b578777386257db2e12
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = f31a6c671d648f49a67e515706492420dcd75027
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = 255cb19bad19d38e1015b5bd8748ed0fb2c839ed
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = b2c04646c1a871e6c3cd1b539ef7298cf228dd19
 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 c4b96e2..3b166d5 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-21 17:21:58.154060411 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
-@@ -0,0 +1,1681 @@
+@@ -0,0 +1,1654 @@
 +//===-- NativeProcessNetBSD.cpp -------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -453,7 +453,7 @@ $NetBSD$
 +          __FUNCTION__, signal, pid);
 +
 +    // This is a thread that exited.  Ensure we're not tracking it anymore.
-+    const bool thread_found = StopTrackingThread(pid);
++    /* XXX: Stop tracking process? */
 +
 +    // We only set the exit status and notify the delegate if we haven't
 +    // already set the process
@@ -464,14 +464,11 @@ $NetBSD$
 +                                    (GetState() == StateType::eStateCrashed);
 +    if (!already_notified) {
 +      if (log)
-+        log->Printf("NativeProcessNetBSD::%s() pid = %d"
-+                    " handling main thread exit (%s), expected exit state "
++        log->Printf("NativeProcessNetBSD::%s() pid = %d "
++                    "handling process exit, expected exit state "
 +                    "already set but state was %s instead, setting exit "
 +                    "state now",
-+                    __FUNCTION__, pid,
-+                    thread_found ? "stopped tracking thread metadata"
-+                                 : "thread metadata not found",
-+                    StateAsCString(GetState()));
++                    __FUNCTION__, pid, StateAsCString(GetState()));
 +      // The main thread exited.  We're done monitoring.  Report to delegate.
 +      SetExitStatus(convert_pid_status_to_exit_type(status),
 +                    convert_pid_status_to_return_code(status), nullptr, true);
@@ -481,10 +478,8 @@ $NetBSD$
 +    } else {
 +      if (log)
 +        log->Printf("NativeProcessNetBSD::%s() pid = %d"
-+                    " main thread now exited (%s)",
-+                    __FUNCTION__, pid,
-+                    thread_found ? "stopped tracking thread metadata"
-+                                 : "thread metadata not found");
++                    " main thread now exited",
++                    __FUNCTION__, pid);
 +    }
 +  }
 +}
@@ -1342,28 +1337,6 @@ $NetBSD$
 +  return false;
 +}
 +
-+bool NativeProcessNetBSD::StopTrackingThread(lldb::tid_t thread_id) {
-+  Log *const log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD);
-+
-+  if (log)
-+    log->Printf("NativeProcessNetBSD::%s (tid: %" PRIu64 ")", __FUNCTION__,
-+                thread_id);
-+
-+  bool found = false;
-+
-+  for (auto it = m_threads.begin(); it != m_threads.end(); ++it) {
-+    if (*it && ((*it)->GetID() == thread_id)) {
-+      m_threads.erase(it);
-+      found = true;
-+      break;
-+    }
-+  }
-+
-+  SignalIfAllThreadsStopped();
-+
-+  return found;
-+}
-+
 +NativeThreadNetBSDSP NativeProcessNetBSD::AddThread(lldb::tid_t thread_id) {
 +  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
 +
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 a96c208..74ac1a3 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 15:47:29.506673013 +0000
+--- source/Plugins/Process/NetBSD/NativeProcessNetBSD.h.orig	2016-12-21 17:21:58.161130776 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
-@@ -0,0 +1,184 @@
+@@ -0,0 +1,182 @@
 +//===-- NativeProcessNetBSD.h ---------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -155,8 +155,6 @@ $NetBSD$
 +
 +  bool HasThreadNoLock(lldb::tid_t thread_id);
 +
-+  bool StopTrackingThread(lldb::tid_t thread_id);
-+
 +  NativeThreadNetBSDSP AddThread(lldb::tid_t thread_id);
 +
 +  Error GetSoftwareBreakpointPCOffset(uint32_t &actual_opcode_size);


Home | Main Index | Thread Index | Old Index