pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lldb-netbsd: Drop local patches to build Plugins_Process_Linux on NetBSD
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sat Dec 17 11:40:58 2016 +0100
Changeset: d9114262bc976a6c39b3ff3df416f2df73b2a420
Modified Files:
lldb-netbsd/distinfo
Removed Files:
lldb-netbsd/patches/patch-cmake_LLDBDependencies.cmake
lldb-netbsd/patches/patch-include_lldb_Host_linux_Personality.h
lldb-netbsd/patches/patch-source_CMakeLists.txt
lldb-netbsd/patches/patch-source_Plugins_Process_CMakeLists.txt
lldb-netbsd/patches/patch-source_Plugins_Process_Linux_CMakeLists.txt
lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp
lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux.cpp
lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux__x86__64.cpp
lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.cpp
lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.h
lldb-netbsd/patches/patch-source_Plugins_Process_Linux_Procfs.h
lldb-netbsd/patches/patch-tools_lldb-server_CMakeLists.txt
Log Message:
lldb-netbsd: Drop local patches to build Plugins_Process_Linux on NetBSD
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=d9114262bc976a6c39b3ff3df416f2df73b2a420
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
lldb-netbsd/distinfo | 12 -
.../patches/patch-cmake_LLDBDependencies.cmake | 12 -
.../patch-include_lldb_Host_linux_Personality.h | 19 --
lldb-netbsd/patches/patch-source_CMakeLists.txt | 12 -
.../patch-source_Plugins_Process_CMakeLists.txt | 12 -
...tch-source_Plugins_Process_Linux_CMakeLists.txt | 16 --
...ce_Plugins_Process_Linux_NativeProcessLinux.cpp | 278 ---------------------
...ns_Process_Linux_NativeRegisterContextLinux.cpp | 36 ---
...s_Linux_NativeRegisterContextLinux__x86__64.cpp | 26 --
...rce_Plugins_Process_Linux_NativeThreadLinux.cpp | 123 ---------
...ource_Plugins_Process_Linux_NativeThreadLinux.h | 14 --
.../patch-source_Plugins_Process_Linux_Procfs.h | 17 --
.../patches/patch-tools_lldb-server_CMakeLists.txt | 26 --
13 files changed, 603 deletions(-)
diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index f8eb080..a4de524 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -12,20 +12,8 @@ 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-cmake_LLDBDependencies.cmake) = c74b2e92695bd5e0ef2f6aca2b1157024c20e89e
-SHA1 (patch-include_lldb_Host_linux_Personality.h) = c9bb2773987b871c000043a9fd3ac143110f79a4
-SHA1 (patch-source_CMakeLists.txt) = d280b1a64b272c4bbdcdab838e69301eb17af732
-SHA1 (patch-source_Plugins_Process_CMakeLists.txt) = be993a6f54da5b09a44e0ca9e4dea96012e539d9
-SHA1 (patch-source_Plugins_Process_Linux_CMakeLists.txt) = a3b5431f8b52d04c838c3a12eaa1fd66cc521c68
-SHA1 (patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp) = 97e0338ef52ce243dda3875ec5e5c218ddff1929
-SHA1 (patch-source_Plugins_Process_Linux_NativeRegisterContextLinux.cpp) = 755cf9dce3aa8d1c32cff9fe3281a09f6d0e6c69
-SHA1 (patch-source_Plugins_Process_Linux_NativeRegisterContextLinux__x86__64.cpp) = f5219581c97d6179222e437122449673eac1cf59
-SHA1 (patch-source_Plugins_Process_Linux_NativeThreadLinux.cpp) = 7d72c5be16304bf2a2cd7b2441828c513e2e8160
-SHA1 (patch-source_Plugins_Process_Linux_NativeThreadLinux.h) = d3685ac9995b4b0c98a94c5a6b2383f386c3fff6
-SHA1 (patch-source_Plugins_Process_Linux_Procfs.h) = 9621cc9494a96d5d4c4fef06dcd9a85bd018f5a1
SHA1 (patch-tools_lldb-mi_MICmnBase.cpp) = 851c82ac61e1241018755fbd7236af00379ac986
SHA1 (patch-tools_lldb-mi_MICmnBase.h) = f550d5e10bcf02fb46472733acdbb820791f22e5
SHA1 (patch-tools_lldb-mi_MIDriver.cpp) = bf1b5399e82bcfe54d6d852f64ed155328f2064d
SHA1 (patch-tools_lldb-mi_MIUtilString.cpp) = 200d9712753b5559da79c2e16fa0889fea1e9432
SHA1 (patch-tools_lldb-mi_MIUtilString.h) = 7e7befec383f88502a97aec509ba39477efde37d
-SHA1 (patch-tools_lldb-server_CMakeLists.txt) = ce9c14973f98fe3669b56886d6bf2033630c5aa7
diff --git a/lldb-netbsd/patches/patch-cmake_LLDBDependencies.cmake b/lldb-netbsd/patches/patch-cmake_LLDBDependencies.cmake
deleted file mode 100644
index 2eec517..0000000
--- a/lldb-netbsd/patches/patch-cmake_LLDBDependencies.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- cmake/LLDBDependencies.cmake.orig 2016-12-14 14:10:24.000000000 +0000
-+++ cmake/LLDBDependencies.cmake
-@@ -115,6 +115,7 @@ endif ()
- # NetBSD-only libraries
- if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
- list(APPEND LLDB_USED_LIBS
-+ lldbPluginProcessLinux
- lldbPluginProcessPOSIX
- )
- endif ()
diff --git a/lldb-netbsd/patches/patch-include_lldb_Host_linux_Personality.h b/lldb-netbsd/patches/patch-include_lldb_Host_linux_Personality.h
deleted file mode 100644
index 3bdda69..0000000
--- a/lldb-netbsd/patches/patch-include_lldb_Host_linux_Personality.h
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- include/lldb/Host/linux/Personality.h.orig 2016-12-14 14:10:24.000000000 +0000
-+++ include/lldb/Host/linux/Personality.h
-@@ -12,6 +12,7 @@
- #ifndef liblldb_Host_linux_Personality_h_
- #define liblldb_Host_linux_Personality_h_
-
-+#if !defined(__NetBSD__)
- #ifdef __ANDROID__
- #include <android/api-level.h>
- #endif
-@@ -21,5 +22,6 @@
- #else
- #include <sys/personality.h>
- #endif
-+#endif
-
- #endif // liblldb_Host_linux_Personality_h_
diff --git a/lldb-netbsd/patches/patch-source_CMakeLists.txt b/lldb-netbsd/patches/patch-source_CMakeLists.txt
deleted file mode 100644
index dccf5ff..0000000
--- a/lldb-netbsd/patches/patch-source_CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- source/CMakeLists.txt.orig 2016-12-14 14:10:24.000000000 +0000
-+++ source/CMakeLists.txt
-@@ -16,6 +16,7 @@ endif ()
-
- if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
- include_directories(
-+ Plugins/Process/Linux
- Plugins/Process/POSIX
- )
- endif ()
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_CMakeLists.txt b/lldb-netbsd/patches/patch-source_Plugins_Process_CMakeLists.txt
deleted file mode 100644
index c7bb39c..0000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/CMakeLists.txt.orig 2016-12-14 14:10:24.000000000 +0000
-+++ source/Plugins/Process/CMakeLists.txt
-@@ -5,6 +5,7 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "FreeB
- add_subdirectory(FreeBSD)
- add_subdirectory(POSIX)
- elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
-+ add_subdirectory(Linux)
- add_subdirectory(POSIX)
- elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
- add_subdirectory(Windows/Common)
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_CMakeLists.txt b/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_CMakeLists.txt
deleted file mode 100644
index 5a4b3dc..0000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/Linux/CMakeLists.txt.orig 2016-05-01 10:39:36.000000000 +0000
-+++ source/Plugins/Process/Linux/CMakeLists.txt
-@@ -5,11 +5,7 @@ include_directories(../Utility)
- add_lldb_library(lldbPluginProcessLinux
- NativeProcessLinux.cpp
- NativeRegisterContextLinux.cpp
-- NativeRegisterContextLinux_arm.cpp
-- NativeRegisterContextLinux_arm64.cpp
- NativeRegisterContextLinux_x86_64.cpp
-- NativeRegisterContextLinux_mips64.cpp
-- NativeRegisterContextLinux_s390x.cpp
- NativeThreadLinux.cpp
- ProcFileReader.cpp
- SingleStepCheck.cpp
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp
deleted file mode 100644
index d4fdb42..0000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeProcessLinux.cpp
+++ /dev/null
@@ -1,278 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/Linux/NativeProcessLinux.cpp.orig 2016-12-14 14:10:24.000000000 +0000
-+++ source/Plugins/Process/Linux/NativeProcessLinux.cpp
-@@ -50,7 +50,9 @@
- // System includes - They have to be included after framework includes because
- // they define some
- // macros which collide with variable names in other modules
-+#if !defined(__NetBSD__)
- #include <linux/unistd.h>
-+#endif
- #include <sys/socket.h>
-
- #include <sys/syscall.h>
-@@ -74,6 +76,7 @@ using namespace llvm;
-
- // Private bits we only need internally.
-
-+#if !defined(__NetBSD__)
- static bool ProcessVmReadvSupported() {
- static bool is_supported;
- static std::once_flag flag;
-@@ -107,6 +110,7 @@ static bool ProcessVmReadvSupported() {
-
- return is_supported;
- }
-+#endif
-
- namespace {
- void MaybeLogLaunchInfo(const ProcessLaunchInfo &info) {
-@@ -155,6 +159,7 @@ void PtraceDisplayBytes(int &req, void *
-
- if (verbose_log) {
- switch (req) {
-+#if !defined(__NetBSD__)
- case PTRACE_POKETEXT: {
- DisplayBytes(buf, &data, 8);
- verbose_log->Printf("PTRACE_POKETEXT %s", buf.GetData());
-@@ -170,6 +175,7 @@ void PtraceDisplayBytes(int &req, void *
- verbose_log->Printf("PTRACE_POKEUSER %s", buf.GetData());
- break;
- }
-+#endif
- case PTRACE_SETREGS: {
- DisplayBytes(buf, data, data_size);
- verbose_log->Printf("PTRACE_SETREGS %s", buf.GetData());
-@@ -180,6 +186,7 @@ void PtraceDisplayBytes(int &req, void *
- verbose_log->Printf("PTRACE_SETFPREGS %s", buf.GetData());
- break;
- }
-+#if !defined(__NetBSD__)
- case PTRACE_SETSIGINFO: {
- DisplayBytes(buf, data, sizeof(siginfo_t));
- verbose_log->Printf("PTRACE_SETSIGINFO %s", buf.GetData());
-@@ -191,6 +198,7 @@ void PtraceDisplayBytes(int &req, void *
- verbose_log->Printf("PTRACE_SETREGSET %s", buf.GetData());
- break;
- }
-+#endif
- default: {}
- }
- }
-@@ -224,6 +232,7 @@ static Error EnsureFDFlags(int fd, int f
- // Public Static Methods
- // -----------------------------------------------------------------------------
-
-+#if !defined(__NetBSD__)
- Error NativeProcessProtocol::Launch(
- ProcessLaunchInfo &launch_info,
- NativeProcessProtocol::NativeDelegate &native_delegate, MainLoop &mainloop,
-@@ -266,7 +275,9 @@ Error NativeProcessProtocol::Launch(
-
- return error;
- }
-+#endif
-
-+#if !defined(__NetBSD__)
- Error NativeProcessProtocol::Attach(
- lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
- MainLoop &mainloop, NativeProcessProtocolSP &native_process_sp) {
-@@ -295,6 +306,7 @@ Error NativeProcessProtocol::Attach(
- native_process_sp = native_process_linux_sp;
- return error;
- }
-+#endif
-
- // -----------------------------------------------------------------------------
- // Public Instance Methods
-@@ -346,7 +358,11 @@ Error NativeProcessLinux::LaunchInferior
- MaybeLogLaunchInfo(launch_info);
-
- ::pid_t pid =
-+#if !defined(__NetBSD__)
- ProcessLauncherLinux().LaunchProcess(launch_info, error).GetProcessId();
-+#else
-+ 0;
-+#endif
- if (error.Fail())
- return error;
-
-@@ -458,7 +474,9 @@ Error NativeProcessLinux::LaunchInferior
-
- // Attach to the requested process.
- // An attach will cause the thread to stop with a SIGSTOP.
-+#if !defined(__NetBSD__)
- error = PtraceWrapper(PTRACE_ATTACH, tid);
-+#endif
- if (error.Fail()) {
- // No such thread. The thread may have exited.
- // More error handling may be needed.
-@@ -528,6 +546,7 @@ Error NativeProcessLinux::SetDefaultPtra
-
- // Have the child raise an event on exit. This is used to keep the child in
- // limbo until it is destroyed.
-+#if !defined(__NetBSD__)
- ptrace_opts |= PTRACE_O_TRACEEXIT;
-
- // Have the tracer trace threads which spawn in the inferior process.
-@@ -540,6 +559,7 @@ Error NativeProcessLinux::SetDefaultPtra
- ptrace_opts |= PTRACE_O_TRACEEXEC;
-
- return PtraceWrapper(PTRACE_SETOPTIONS, pid, nullptr, (void *)ptrace_opts);
-+#endif
- }
-
- static ExitType convert_pid_status_to_exit_type(int status) {
-@@ -835,6 +855,7 @@ void NativeProcessLinux::MonitorSIGTRAP(
-
- assert(info.si_signo == SIGTRAP && "Unexpected child signal!");
-
-+#if !defined(__NetBSD__)
- switch (info.si_code) {
- // TODO: these two cases are required if we want to support tracing of the
- // inferiors' children. We'd need this to debug a monitor.
-@@ -1038,6 +1059,7 @@ void NativeProcessLinux::MonitorSIGTRAP(
- __FUNCTION__, GetID(), thread.GetID(), info.si_code);
- break;
- }
-+#endif
- }
-
- void NativeProcessLinux::MonitorTrace(NativeThreadLinux &thread) {
-@@ -1110,6 +1132,7 @@ void NativeProcessLinux::MonitorSignal(c
- //
- // Similarly, ACK signals generated by this monitor.
-
-+#if !defined(__NetBSD__)
- // Handle the signal.
- if (info.si_code == SI_TKILL || info.si_code == SI_USER) {
- if (log)
-@@ -1194,6 +1217,7 @@ void NativeProcessLinux::MonitorSignal(c
- // Done handling.
- return;
- }
-+#endif
-
- if (log)
- log->Printf("NativeProcessLinux::%s() received signal %s", __FUNCTION__,
-@@ -2132,7 +2156,11 @@ NativeProcessLinux::GetCrashReasonForSIG
-
- Error NativeProcessLinux::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
- size_t &bytes_read) {
-+#if !defined(__NetBSD__)
- if (ProcessVmReadvSupported()) {
-+#else
-+ {
-+#endif
- // The process_vm_readv path is about 50 times faster than ptrace api. We
- // want to use
- // this syscall if it is supported.
-@@ -2145,7 +2173,11 @@ Error NativeProcessLinux::ReadMemory(lld
- remote_iov.iov_base = reinterpret_cast<void *>(addr);
- remote_iov.iov_len = size;
-
-+#if !defined(__NetBSD__)
- bytes_read = process_vm_readv(pid, &local_iov, 1, &remote_iov, 1, 0);
-+#else
-+ bytes_read = 0;
-+#endif
- const bool success = bytes_read == size;
-
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-@@ -2175,6 +2207,7 @@ Error NativeProcessLinux::ReadMemory(lld
- (void *)addr, buf, size);
-
- for (bytes_read = 0; bytes_read < size; bytes_read += remainder) {
-+#if !defined(__NetBSD__)
- Error error = NativeProcessLinux::PtraceWrapper(
- PTRACE_PEEKDATA, GetID(), (void *)addr, nullptr, 0, &data);
- if (error.Fail()) {
-@@ -2182,6 +2215,7 @@ Error NativeProcessLinux::ReadMemory(lld
- ProcessPOSIXLog::DecNestLevel();
- return error;
- }
-+#endif
-
- remainder = size - bytes_read;
- remainder = remainder > k_ptrace_word_size ? k_ptrace_word_size : remainder;
-@@ -2248,6 +2282,7 @@ Error NativeProcessLinux::WriteMemory(ll
- log->Printf("NativeProcessLinux::%s() [%p]:0x%lx (0x%lx)", __FUNCTION__,
- (void *)addr, *(const unsigned long *)src, data);
-
-+#if !defined(__NetBSD__)
- error = NativeProcessLinux::PtraceWrapper(PTRACE_POKEDATA, GetID(),
- (void *)addr, (void *)data);
- if (error.Fail()) {
-@@ -2255,6 +2290,7 @@ Error NativeProcessLinux::WriteMemory(ll
- ProcessPOSIXLog::DecNestLevel();
- return error;
- }
-+#endif
- } else {
- unsigned char buff[8];
- size_t bytes_read;
-@@ -2293,19 +2329,33 @@ Error NativeProcessLinux::WriteMemory(ll
- }
-
- Error NativeProcessLinux::GetSignalInfo(lldb::tid_t tid, void *siginfo) {
-+#if !defined(__NetBSD__)
- return PtraceWrapper(PTRACE_GETSIGINFO, tid, nullptr, siginfo);
-+#else
-+ Error error;
-+ return error;
-+#endif
- }
-
- Error NativeProcessLinux::GetEventMessage(lldb::tid_t tid,
- unsigned long *message) {
-+#if !defined(__NetBSD__)
- return PtraceWrapper(PTRACE_GETEVENTMSG, tid, nullptr, message);
-+#else
-+ Error error;
-+ return error;
-+#endif
- }
-
- Error NativeProcessLinux::Detach(lldb::tid_t tid) {
- if (tid == LLDB_INVALID_THREAD_ID)
- return Error();
--
-+#if !defined(__NetBSD__)
- return PtraceWrapper(PTRACE_DETACH, tid);
-+#else
-+ Error error;
-+ return error;
-+#endif
- }
-
- bool NativeProcessLinux::HasThreadNoLock(lldb::tid_t thread_id) {
-@@ -2649,7 +2699,11 @@ void NativeProcessLinux::SigchldHandler(
- // Process all pending waitpid notifications.
- while (true) {
- int status = -1;
-+#if !defined(__NetBSD__)
- ::pid_t wait_pid = waitpid(-1, &status, __WALL | __WNOTHREAD | WNOHANG);
-+#else
-+ ::pid_t wait_pid = waitpid(-1, &status, /* __WALL | __WNOTHREAD | */ WNOHANG);
-+#endif
-
- if (wait_pid == 0)
- break; // We are done.
-@@ -2713,12 +2767,16 @@ Error NativeProcessLinux::PtraceWrapper(
- PtraceDisplayBytes(req, data, data_size);
-
- errno = 0;
-+#if !defined(__NetBSD__)
- if (req == PTRACE_GETREGSET || req == PTRACE_SETREGSET)
- ret = ptrace(static_cast<__ptrace_request>(req), static_cast<::pid_t>(pid),
- *(unsigned int *)addr, data);
- else
- ret = ptrace(static_cast<__ptrace_request>(req), static_cast<::pid_t>(pid),
- addr, data);
-+#else
-+ ret = 0;
-+#endif
-
- if (ret == -1)
- error.SetErrorToErrno();
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux.cpp
deleted file mode 100644
index b6ebac8..0000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp.orig 2016-10-19 22:25:12.000000000 +0000
-+++ source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
-@@ -163,6 +163,7 @@ Error NativeRegisterContextLinux::DoRead
- Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_REGISTERS));
-
- long data;
-+#if !defined(__NetBSD__)
- Error error = NativeProcessLinux::PtraceWrapper(
- PTRACE_PEEKUSER, m_thread.GetID(), reinterpret_cast<void *>(offset),
- nullptr, 0, &data);
-@@ -170,6 +171,9 @@ Error NativeRegisterContextLinux::DoRead
- if (error.Success())
- // First cast to an unsigned of the same size to avoid sign extension.
- value.SetUInt(static_cast<unsigned long>(data), size);
-+#else
-+ Error error;
-+#endif
-
- if (log)
- log->Printf("NativeRegisterContextLinux::%s() reg %s: 0x%lx", __FUNCTION__,
-@@ -188,8 +192,13 @@ Error NativeRegisterContextLinux::DoWrit
- log->Printf("NativeRegisterContextLinux::%s() reg %s: %p", __FUNCTION__,
- reg_name, buf);
-
-+#if !defined(__NetBSD__)
- return NativeProcessLinux::PtraceWrapper(
- PTRACE_POKEUSER, m_thread.GetID(), reinterpret_cast<void *>(offset), buf);
-+#else
-+ Error error;
-+ return error;
-+#endif
- }
-
- Error NativeRegisterContextLinux::DoReadGPR(void *buf, size_t buf_size) {
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux__x86__64.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux__x86__64.cpp
deleted file mode 100644
index 3e0a1be..0000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeRegisterContextLinux__x86__64.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp.orig 2016-12-14 14:10:24.000000000 +0000
-+++ source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
-@@ -20,7 +20,9 @@
- #include "Plugins/Process/Utility/RegisterContextLinux_i386.h"
- #include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
-
-+#if !defined(__NetBSD__)
- #include <linux/elf.h>
-+#endif
-
- using namespace lldb_private;
- using namespace lldb_private::process_linux;
-@@ -223,7 +225,11 @@ static const RegisterSet g_reg_sets_x86_
- // On x86_64 NT_PRFPREG is used to access the FXSAVE area. On i386, we need to
- // use NT_PRXFPREG.
- static inline unsigned int fxsr_regset(const ArchSpec &arch) {
-+#if !defined(__NetBSD__)
- return arch.GetAddressByteSize() == 8 ? NT_PRFPREG : NT_PRXFPREG;
-+#else
-+ return 0;
-+#endif
- }
-
- // ----------------------------------------------------------------------------
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.cpp
deleted file mode 100644
index ee87079..0000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/Linux/NativeThreadLinux.cpp.orig 2016-10-19 22:25:12.000000000 +0000
-+++ source/Plugins/Process/Linux/NativeThreadLinux.cpp
-@@ -29,9 +29,13 @@
-
- #include <sys/syscall.h>
- // Try to define a macro to encapsulate the tgkill syscall
-+#if !defined(__NetBSD__)
- #define tgkill(pid, tid, sig) \
- syscall(__NR_tgkill, static_cast<::pid_t>(pid), static_cast<::pid_t>(tid), \
- sig)
-+#else
-+#define tgkill(pid, tid, sig) 0
-+#endif
-
- using namespace lldb;
- using namespace lldb_private;
-@@ -97,7 +101,11 @@ std::string NativeThreadLinux::GetName()
- // const NativeProcessLinux *const process =
- // reinterpret_cast<NativeProcessLinux*> (process_sp->get ());
- llvm::SmallString<32> thread_name;
-+#if !defined(__NetBSD__)
- HostNativeThread::GetName(GetID(), thread_name);
-+#else
-+ // error: invalid conversion from 'lldb::tid_t {aka long unsigned int}' to 'lldb::thread_t {aka __pthread_st*}' [-fpermissive]
-+#endif
- return thread_name.c_str();
- }
-
-@@ -216,8 +224,13 @@ Error NativeThreadLinux::Resume(uint32_t
- if (signo != LLDB_INVALID_SIGNAL_NUMBER)
- data = signo;
-
-+#if !defined(__NetBSD__)
- return NativeProcessLinux::PtraceWrapper(PTRACE_CONT, GetID(), nullptr,
- reinterpret_cast<void *>(data));
-+#else
-+ Error error;
-+ return error;
-+#endif
- }
-
- void NativeThreadLinux::MaybePrepareSingleStepWorkaround() {
-@@ -226,6 +239,7 @@ void NativeThreadLinux::MaybePrepareSing
-
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-
-+#if !defined(__NetBSD__)
- if (sched_getaffinity(static_cast<::pid_t>(m_tid), sizeof m_original_cpu_set,
- &m_original_cpu_set) != 0) {
- // This should really not fail. But, just in case...
-@@ -253,12 +267,14 @@ void NativeThreadLinux::MaybePrepareSing
- ": %s",
- __FUNCTION__, m_tid, error.AsCString());
- }
-+#endif
- }
-
- void NativeThreadLinux::MaybeCleanupSingleStepWorkaround() {
- if (!SingleStepWorkaroundNeeded())
- return;
-
-+#if !defined(__NetBSD__)
- if (sched_setaffinity(static_cast<::pid_t>(m_tid), sizeof m_original_cpu_set,
- &m_original_cpu_set) != 0) {
- Error error(errno, eErrorTypePOSIX);
-@@ -268,6 +284,7 @@ void NativeThreadLinux::MaybeCleanupSing
- ": %s",
- __FUNCTION__, m_tid, error.AsCString());
- }
-+#endif
- }
-
- Error NativeThreadLinux::SingleStep(uint32_t signo) {
-@@ -285,10 +302,15 @@ Error NativeThreadLinux::SingleStep(uint
- // If hardware single-stepping is not supported, we just do a continue. The
- // breakpoint on the
- // next instruction has been setup in NativeProcessLinux::Resume.
-+#if !defined(__NetBSD__)
- return NativeProcessLinux::PtraceWrapper(
- GetProcess().SupportHardwareSingleStepping() ? PTRACE_SINGLESTEP
- : PTRACE_CONT,
- m_tid, nullptr, reinterpret_cast<void *>(data));
-+#else
-+ Error error;
-+ return error;
-+#endif
- }
-
- void NativeThreadLinux::SetStoppedBySignal(uint32_t signo,
-@@ -310,6 +332,7 @@ void NativeThreadLinux::SetStoppedBySign
- case SIGBUS:
- case SIGFPE:
- case SIGILL:
-+#if !defined(__NetBSD__)
- // In case of MIPS64 target, SI_KERNEL is generated for invalid 64bit
- // address.
- const auto reason =
-@@ -317,6 +340,7 @@ void NativeThreadLinux::SetStoppedBySign
- ? CrashReason::eInvalidAddress
- : GetCrashReason(*info);
- m_stop_description = GetCrashReasonString(reason, *info);
-+#endif
- break;
- }
- }
-@@ -440,6 +464,7 @@ Error NativeThreadLinux::RequestStop() {
-
- Error err;
- errno = 0;
-+#if !defined(__NetBSD__)
- if (::tgkill(pid, tid, SIGSTOP) != 0) {
- err.SetErrorToErrno();
- if (log)
-@@ -447,6 +472,7 @@ Error NativeThreadLinux::RequestStop() {
- ", SIGSTOP) failed: %s",
- __FUNCTION__, pid, tid, err.AsCString());
- }
-+#endif
-
- return err;
- }
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.h b/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.h
deleted file mode 100644
index 2cff18b..0000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_NativeThreadLinux.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/Linux/NativeThreadLinux.h.orig 2016-09-10 17:36:23.000000000 +0000
-+++ source/Plugins/Process/Linux/NativeThreadLinux.h
-@@ -107,7 +107,9 @@ private:
- std::string m_stop_description;
- using WatchpointIndexMap = std::map<lldb::addr_t, uint32_t>;
- WatchpointIndexMap m_watchpoint_index_map;
-+#if !defined(__NetBSD__)
- cpu_set_t m_original_cpu_set; // For single-step workaround.
-+#endif
- };
-
- typedef std::shared_ptr<NativeThreadLinux> NativeThreadLinuxSP;
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_Procfs.h b/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_Procfs.h
deleted file mode 100644
index d5e98d5..0000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_Linux_Procfs.h
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/Linux/Procfs.h.orig 2016-09-10 17:36:23.000000000 +0000
-+++ source/Plugins/Process/Linux/Procfs.h
-@@ -12,6 +12,7 @@
-
- #include <sys/ptrace.h>
-
-+#if !defined(__NetBSD__)
- #ifdef __ANDROID__
- #if defined(__arm64__) || defined(__aarch64__)
- typedef unsigned long elf_greg_t;
-@@ -29,3 +30,4 @@ typedef struct user_fpsimd_state elf_fpr
- #else // __ANDROID__
- #include <sys/procfs.h>
- #endif // __ANDROID__
-+#endif
diff --git a/lldb-netbsd/patches/patch-tools_lldb-server_CMakeLists.txt b/lldb-netbsd/patches/patch-tools_lldb-server_CMakeLists.txt
deleted file mode 100644
index f93d142..0000000
--- a/lldb-netbsd/patches/patch-tools_lldb-server_CMakeLists.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
---- tools/lldb-server/CMakeLists.txt.orig 2016-12-14 14:10:24.000000000 +0000
-+++ tools/lldb-server/CMakeLists.txt
-@@ -17,6 +17,7 @@ endif ()
- if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
- include_directories(
- ../../../../llvm/include
-+ ../../source/Plugins/Process/Linux
- ../../source/Plugins/Process/POSIX
- )
- endif ()
-@@ -84,6 +85,13 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
- )
- endif ()
-
-+if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
-+ list(APPEND LLDB_USED_LIBS
-+ lldbPluginProcessLinux
-+ lldbPluginProcessPOSIX
-+ )
-+endif ()
-+
- # Darwin-only libraries
- if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
- list(APPEND LLDB_USED_LIBS
Home |
Main Index |
Thread Index |
Old Index