pkgsrc-WIP-changes archive

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

lldb-netbsd: Refactor PT_LWPINFO usage in inferior launch function



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Dec 24 08:29:19 2016 +0100
Changeset:	3c051e2b755bfdccb4995ef68846e9eb40b78e50

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
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h

Log Message:
lldb-netbsd: Refactor PT_LWPINFO usage in inferior launch function

AddThread() for the first (or empty) list of threads calls SetCurrentThreadID.

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=3c051e2b755bfdccb4995ef68846e9eb40b78e50

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

diffstat:
 lldb-netbsd/distinfo                                          |  8 ++++----
 ...atch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 11 +++--------
 .../patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h |  2 +-
 ...patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp |  2 +-
 .../patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h  |  2 +-
 5 files changed, 10 insertions(+), 15 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index aa2de7e..20dfb3f 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -27,10 +27,10 @@ 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) = 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-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = fa6f32a3c93f2b17ddfdf263948e2235795a0c3e
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = 73a67a193170ea34de9cc6df4763a35055efa437
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = a0c6195cd2339ddf66df91d06eb258248ac1b23d
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = a03e8e6159c9a7a927a2acc800b19c83b6e46de5
 SHA1 (patch-tools_lldb-mi_MICmnBase.cpp) = 851c82ac61e1241018755fbd7236af00379ac986
 SHA1 (patch-tools_lldb-mi_MICmnBase.h) = f550d5e10bcf02fb46472733acdbb820791f22e5
 SHA1 (patch-tools_lldb-mi_MIDriver.cpp) = bf1b5399e82bcfe54d6d852f64ed155328f2064d
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 1ff1783..ba00095 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig	2016-12-24 04:33:38.213380608 +0000
+--- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig	2016-12-24 07:25:32.142702421 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
-@@ -0,0 +1,1597 @@
+@@ -0,0 +1,1592 @@
 +//===-- NativeProcessNetBSD.cpp -------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -372,18 +372,13 @@ $NetBSD$
 +    SetState(StateType::eStateInvalid);
 +    return error;
 +  }
-+  NativeThreadNetBSDSP thread_sp = AddThread(info.pl_lwpid);
-+  assert(thread_sp && "AddThread() returned a nullptr thread");
-+  /* It's unclear which thread is current - the first one? */
-+  SetCurrentThreadID(thread_sp->GetID());
-+
 +  while (info.pl_lwpid != 0) {
++    AddThread(info.pl_lwpid);
 +    error = PtraceWrapper(PT_LWPINFO, pid, &info, sizeof(info));
 +    if (error.Fail()) {
 +      SetState(StateType::eStateInvalid);
 +      return error;
 +    }
-+    AddThread(info.pl_lwpid);
 +  }
 +
 +  /* Set process stopped */
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 08b761c..1628424 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- source/Plugins/Process/NetBSD/NativeProcessNetBSD.h.orig	2016-12-24 04:33:38.220266609 +0000
+--- source/Plugins/Process/NetBSD/NativeProcessNetBSD.h.orig	2016-12-24 07:25:32.149555108 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
 @@ -0,0 +1,180 @@
 +//===-- NativeProcessNetBSD.h ---------------------------------- -*- C++ -*-===//
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
index 5bdcc2a..a44c3b6 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp.orig	2016-12-24 04:33:38.226574254 +0000
+--- source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp.orig	2016-12-24 07:25:32.155843686 +0000
 +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
 @@ -0,0 +1,167 @@
 +//===-- NativeThreadNetBSD.cpp --------------------------------- -*- C++ -*-===//
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
index 1f1ec74..f703c91 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- source/Plugins/Process/NetBSD/NativeThreadNetBSD.h.orig	2016-12-24 04:33:38.232811151 +0000
+--- source/Plugins/Process/NetBSD/NativeThreadNetBSD.h.orig	2016-12-24 07:25:32.162123674 +0000
 +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
 @@ -0,0 +1,77 @@
 +//===-- NativeThreadNetBSD.h ----------------------------------- -*- C++ -*-===//


Home | Main Index | Thread Index | Old Index