pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/lldb



Module Name:    pkgsrc
Committed By:   he
Date:           Sat Sep 19 17:25:02 UTC 2020

Modified Files:
        pkgsrc/devel/lldb: Makefile distinfo
Added Files:
        pkgsrc/devel/lldb/patches:
            patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
            patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 pkgsrc/devel/lldb/Makefile
cvs rdiff -u -r1.20 -r1.21 pkgsrc/devel/lldb/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp \
    pkgsrc/devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h

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

Modified files:

Index: pkgsrc/devel/lldb/Makefile
diff -u pkgsrc/devel/lldb/Makefile:1.28 pkgsrc/devel/lldb/Makefile:1.29
--- pkgsrc/devel/lldb/Makefile:1.28     Sun Jul 26 19:20:12 2020
+++ pkgsrc/devel/lldb/Makefile  Sat Sep 19 17:25:01 2020
@@ -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

Index: pkgsrc/devel/lldb/distinfo
diff -u pkgsrc/devel/lldb/distinfo:1.20 pkgsrc/devel/lldb/distinfo:1.21
--- pkgsrc/devel/lldb/distinfo:1.20     Sun Jul 26 19:20:12 2020
+++ pkgsrc/devel/lldb/distinfo  Sat Sep 19 17:25:01 2020
@@ -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

Added files:

Index: pkgsrc/devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
diff -u /dev/null pkgsrc/devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp:1.1
--- /dev/null   Sat Sep 19 17:25:02 2020
+++ pkgsrc/devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp       Sat Sep 19 17:25:02 2020
@@ -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() {
Index: pkgsrc/devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
diff -u /dev/null pkgsrc/devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h:1.1
--- /dev/null   Sat Sep 19 17:25:02 2020
+++ pkgsrc/devel/lldb/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h Sat Sep 19 17:25:02 2020
@@ -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