pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/lldb Add some code which makes this build on 9.0...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e5aebac18dfd
branches: trunk
changeset: 439412:e5aebac18dfd
user: he <he%pkgsrc.org@localhost>
date: Sat Sep 19 17:25:01 2020 +0000
description:
Add some code which makes this build on 9.0 plain, verified on
amd64, since PT_STOP was introduced after the 9.0 release. Based
on hints from kamil@.
Bump PKGREVISION.
diffstat:
devel/lldb/Makefile | 3 +-
devel/lldb/distinfo | 5 +-
devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 54 ++++++++++
devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h | 14 ++
4 files changed, 73 insertions(+), 3 deletions(-)
diffs (107 lines):
diff -r b54e33ce2ff2 -r e5aebac18dfd devel/lldb/Makefile
--- a/devel/lldb/Makefile Sat Sep 19 15:51:33 2020 +0000
+++ b/devel/lldb/Makefile Sat Sep 19 17:25:01 2020 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.28 2020/07/26 19:20:12 adam Exp $
+# $NetBSD: Makefile,v 1.29 2020/09/19 17:25:01 he Exp $
.include "../../lang/llvm/version.mk"
DISTNAME= lldb-${LLVM_VERSION}.src
PKGNAME= ${DISTNAME:S/.src//}
+PKGREVISION= 1
CATEGORIES= lang devel
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
diff -r b54e33ce2ff2 -r e5aebac18dfd devel/lldb/distinfo
--- a/devel/lldb/distinfo Sat Sep 19 15:51:33 2020 +0000
+++ b/devel/lldb/distinfo Sat Sep 19 17:25:01 2020 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.20 2020/07/26 19:20:12 adam Exp $
+$NetBSD: distinfo,v 1.21 2020/09/19 17:25:01 he Exp $
SHA1 (lldb-10.0.1.src.tar.xz) = 90b946ff7b850bcded598509a10d0795e7da3f63
RMD160 (lldb-10.0.1.src.tar.xz) = 59442a4685c7c6c2468477ce16fa09e4fef8540d
SHA512 (lldb-10.0.1.src.tar.xz) = d7155cd6a7e2244cbf1f6114d790fdf2e667fd6285e2fc3a08a8f49c8e08f32827d7fa83d741ea0b54b788bd13c0c7498cf312a2cd3e86e049606869341b482e
Size (lldb-10.0.1.src.tar.xz) = 9632124 bytes
-SHA1 (patch-cmake_modules_LLDBStandalone.cmake) = 55a8d614cc52872968fc7c7c205c7d6e4021b538
SHA1 (patch-source_API_CMakeLists.txt) = ed630498cdd30f6f11c5fbfa8d9f539baeba5a2c
SHA1 (patch-source_Host_CMakeLists.txt) = 5c7ae7b896aa110fe7ab21ed3616350e0958bc2a
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = e3044c199a9382960c666ad42ca69b90828b686b
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = 18f735fc0deb0b835816b8bca57b028ff352c66d
diff -r b54e33ce2ff2 -r e5aebac18dfd devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp Sat Sep 19 17:25:01 2020 +0000
@@ -0,0 +1,54 @@
+$NetBSD: patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp,v 1.1 2020/09/19 17:25:02 he Exp $
+
+Provide StopProcess.
+
+--- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig 2020-07-07 16:21:37.000000000 +0000
++++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
+@@ -344,6 +344,29 @@ void NativeProcessNetBSD::MonitorSignal(
+ SetState(StateType::eStateStopped, true);
+ }
+
++Status NativeProcessNetBSD::StopProcess(lldb::pid_t pid) {
++#ifdef PT_STOP
++ return PtraceWrapper(PT_STOP, pid);
++#else
++ Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PTRACE));
++ int ret;
++ Status error;
++
++ errno = 0;
++ ret = kill(pid, SIGSTOP);
++
++ if (ret == -1)
++ error.SetErrorToErrno();
++
++ LLDB_LOG(log, "kill({0}, SIGSTOP)", pid);
++
++ if (error.Fail())
++ LLDB_LOG(log, "kill() failed: {0}", error);
++
++ return error;
++#endif
++}
++
+ Status NativeProcessNetBSD::PtraceWrapper(int req, lldb::pid_t pid, void *addr,
+ int data, int *result) {
+ Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PTRACE));
+@@ -497,7 +520,7 @@ Status NativeProcessNetBSD::Resume(const
+ }
+
+ Status NativeProcessNetBSD::Halt() {
+- return PtraceWrapper(PT_STOP, GetID());
++ return StopProcess(GetID());
+ }
+
+ Status NativeProcessNetBSD::Detach() {
+@@ -523,7 +546,7 @@ Status NativeProcessNetBSD::Signal(int s
+ }
+
+ Status NativeProcessNetBSD::Interrupt() {
+- return PtraceWrapper(PT_STOP, GetID());
++ return StopProcess(GetID());
+ }
+
+ Status NativeProcessNetBSD::Kill() {
diff -r b54e33ce2ff2 -r e5aebac18dfd devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h Sat Sep 19 17:25:01 2020 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h,v 1.1 2020/09/19 17:25:02 he Exp $
+
+Declare StopProcess.
+
+--- work/lldb-10.0.1.src/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h.orig 2020-07-07 16:21:37.000000000 +0000
++++ work/lldb-10.0.1.src/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
+@@ -86,6 +86,7 @@ public:
+ // Interface used by NativeRegisterContext-derived classes.
+ static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
+ int data = 0, int *result = nullptr);
++ static Status StopProcess(lldb::pid_t pid);
+
+ private:
+ MainLoop::SignalHandleUP m_sigchld_handle;
Home |
Main Index |
Thread Index |
Old Index