pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lldb-git: Handle thread id on NetBSD in tests
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sat Feb 25 07:44:24 2017 +0100
Changeset: b123df8ed1f3c892016ffa07b5c2d9dd02ea246e
Modified Files:
lldb-git/distinfo
Added Files:
lldb-git/patches/patch-packages_Python_lldbsuite_test_tools_lldb-server_exit-code_main.cpp
lldb-git/patches/patch-packages_Python_lldbsuite_test_tools_lldb-server_main.cpp
Log Message:
lldb-git: Handle thread id on NetBSD in tests
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=b123df8ed1f3c892016ffa07b5c2d9dd02ea246e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
lldb-git/distinfo | 2 ++
...suite_test_tools_lldb-server_exit-code_main.cpp | 23 ++++++++++++++++++++++
...ython_lldbsuite_test_tools_lldb-server_main.cpp | 23 ++++++++++++++++++++++
3 files changed, 48 insertions(+)
diffs:
diff --git a/lldb-git/distinfo b/lldb-git/distinfo
index 7931384fd5..b39116663b 100644
--- a/lldb-git/distinfo
+++ b/lldb-git/distinfo
@@ -12,3 +12,5 @@ Size (libcxx-3.6.2.src.tar.xz) = 944020 bytes
SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
+SHA1 (patch-packages_Python_lldbsuite_test_tools_lldb-server_exit-code_main.cpp) = f45dd24f2979fb92fe859070a127dfc180a3afd3
+SHA1 (patch-packages_Python_lldbsuite_test_tools_lldb-server_main.cpp) = 9b4dbd44a438e163e9f15879164781aa84611319
diff --git a/lldb-git/patches/patch-packages_Python_lldbsuite_test_tools_lldb-server_exit-code_main.cpp b/lldb-git/patches/patch-packages_Python_lldbsuite_test_tools_lldb-server_exit-code_main.cpp
new file mode 100644
index 0000000000..1a03121f3a
--- /dev/null
+++ b/lldb-git/patches/patch-packages_Python_lldbsuite_test_tools_lldb-server_exit-code_main.cpp
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- packages/Python/lldbsuite/test/tools/lldb-server/exit-code/main.cpp.orig 2017-02-25 06:05:33.924204869 +0000
++++ packages/Python/lldbsuite/test/tools/lldb-server/exit-code/main.cpp
+@@ -18,6 +18,8 @@ __OSX_AVAILABLE_STARTING(__MAC_10_6, __I
+ int pthread_threadid_np(pthread_t, __uint64_t *);
+ #elif defined(__linux__)
+ #include <sys/syscall.h>
++#elif defined(__NetBSD__)
++#include <lwp.h>
+ #endif
+
+ static const char *const RETVAL_PREFIX = "retval:";
+@@ -62,6 +64,9 @@ static void print_thread_id() {
+ #elif defined(__linux__)
+ // This is a call to gettid() via syscall.
+ printf("%" PRIx64, static_cast<uint64_t>(syscall(__NR_gettid)));
++#elif defined(__NetBSD__)
++ // Technically lwpid_t is 32-bit signed integer
++ printf("%" PRIx64, static_cast<uint64_t>(_lwp_self()));
+ #else
+ printf("{no-tid-support}");
+ #endif
diff --git a/lldb-git/patches/patch-packages_Python_lldbsuite_test_tools_lldb-server_main.cpp b/lldb-git/patches/patch-packages_Python_lldbsuite_test_tools_lldb-server_main.cpp
new file mode 100644
index 0000000000..73bdd3ad77
--- /dev/null
+++ b/lldb-git/patches/patch-packages_Python_lldbsuite_test_tools_lldb-server_main.cpp
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- packages/Python/lldbsuite/test/tools/lldb-server/main.cpp.orig 2017-02-25 06:05:33.924756574 +0000
++++ packages/Python/lldbsuite/test/tools/lldb-server/main.cpp
+@@ -27,6 +27,8 @@ __OSX_AVAILABLE_STARTING(__MAC_10_6, __I
+ int pthread_threadid_np(pthread_t, __uint64_t *);
+ #elif defined(__linux__)
+ #include <sys/syscall.h>
++#elif defined(__NetBSD__)
++#include <lwp.h>
+ #endif
+
+ static const char *const RETVAL_PREFIX = "retval:";
+@@ -71,6 +73,9 @@ static void print_thread_id() {
+ #elif defined(__linux__)
+ // This is a call to gettid() via syscall.
+ printf("%" PRIx64, static_cast<uint64_t>(syscall(__NR_gettid)));
++#elif defined(__NetBSD__)
++ // Technically lwpid_t is 32-bit signed integer
++ printf("%" PRIx64, static_cast<uint64_t>(_lwp_self()));
+ #else
+ printf("{no-tid-support}");
+ #endif
Home |
Main Index |
Thread Index |
Old Index