pkgsrc-WIP-changes archive

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

lldb-netbsd: Actually commit deletion of local patches



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Thu Apr 6 03:37:44 2017 +0200
Changeset:	15ae3b66ae7451da271f34ec1f2dc51c3ca5452d

Modified Files:
	lldb-netbsd/Makefile
	lldb-netbsd/TODO
	lldb-netbsd/distinfo
Removed Files:
	lldb-netbsd/patches/patch-source_Host_common_Host.cpp
	lldb-netbsd/patches/patch-source_Plugins_DynamicLoader_POSIX-DYLD_DYLDRendezvous.cpp
	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_NativeRegisterContextNetBSD.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
	lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp

Log Message:
lldb-netbsd: Actually commit deletion of local patches

Update to SVN r.299109
Update TODO

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=15ae3b66ae7451da271f34ec1f2dc51c3ca5452d

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

diffstat:
 lldb-netbsd/Makefile                               |   2 +-
 lldb-netbsd/TODO                                   |  27 ++--
 lldb-netbsd/distinfo                               |  12 --
 .../patches/patch-source_Host_common_Host.cpp      |  13 --
 ...ins_DynamicLoader_POSIX-DYLD_DYLDRendezvous.cpp |  20 ---
 ..._Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 146 ---------------------
 ...ce_Plugins_Process_NetBSD_NativeProcessNetBSD.h |  13 --
 ..._Process_NetBSD_NativeRegisterContextNetBSD.cpp |  44 -------
 ...ns_Process_NetBSD_NativeRegisterContextNetBSD.h |  29 ----
 ...NetBSD_NativeRegisterContextNetBSD__x86__64.cpp |  24 ----
 ...s_NetBSD_NativeRegisterContextNetBSD__x86__64.h |  21 ---
 ...e_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp |  35 -----
 ...rce_Plugins_Process_NetBSD_NativeThreadNetBSD.h |  16 ---
 ...rce_Plugins_Process_elf-core_ProcessElfCore.cpp | 120 -----------------
 ...urce_Plugins_Process_elf-core_ThreadElfCore.cpp |  60 ---------
 15 files changed, 14 insertions(+), 568 deletions(-)

diffs:
diff --git a/lldb-netbsd/Makefile b/lldb-netbsd/Makefile
index 6fb4f5fb51..73295a111e 100644
--- a/lldb-netbsd/Makefile
+++ b/lldb-netbsd/Makefile
@@ -5,7 +5,7 @@ CATEGORIES=	lang devel
 
 SVN_REPOSITORIES=	lldb
 SVN_REPO.lldb=		http://llvm.org/svn/llvm-project/lldb/trunk
-SVN_REVISION.lldb=	298953
+SVN_REVISION.lldb=	299109
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	http://lldb.org/
diff --git a/lldb-netbsd/TODO b/lldb-netbsd/TODO
index e94feea411..e6f89f9dd7 100644
--- a/lldb-netbsd/TODO
+++ b/lldb-netbsd/TODO
@@ -22,18 +22,17 @@ Introduce objc++ setup with gcc(1) for "make test":
     g++: error trying to exec 'cc1objplus': execvp: No such file or directory
     gmake[4]: *** [main.o] Error 1
 
-To be done
+Known bugs
 ==========
- - FPR registers' accessors (amd64)
- - debug registers support (amd64)
- - Host::LaunchProcessPosixSpawn verify ::posix_spawnattr_setsigdefault on NetBSD
- - thread resume/suspend operation
- - i386 support
- - upstream NetBSD support
- - adapt upstream Python tests to run on NetBSD and pass as many of them as
-   possible
- - import LLDB into base
- - add NetBSD specific ATF tests verifying fundamental functionality of LLDB
- - support F_GETPATH path in source/Host/common/File.cpp
-
-and of course fix as many bugs as possible
+ - curses application don't work - env broken?
+ - attaching to process broken or violating PaX MPROTECT
+   (violation is fine, just fix research the real reason)
+ - core(5) isn't really functional
+ - no threads in process plugin
+ - no x86-32 bit support
+ - no FPR registers
+ - no watchpoints
+ - support F_GETPATH?
+ - fix test suite bugs..
+ - unknown ones
+ - switch from kvm(3) to sysctl(7)
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index fef69bd169..7931384fd5 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -12,15 +12,3 @@ 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-source_Host_common_Host.cpp) = 7d48b8bb1e4350ba6d3ddc6357b9b8dc82d6b32d
-SHA1 (patch-source_Plugins_DynamicLoader_POSIX-DYLD_DYLDRendezvous.cpp) = efc346d0376ddc66634bba00029deadc442a4841
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 13e713d4d24ed996a6043928895ede9e3d2619f7
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = ff143109aee8e96b5c0112da5c29227702f5142a
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = 1c4e5f6f6bf6f665ed659b195de02f7ca26827c9
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = 7438ec533021afadea9f0b8ef28a4432b1fe682c
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = ea9781e8a37719bee1baad234f3a59720a1720d4
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h) = 4717298b6ce2923218f99042d8369639f5665c6a
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = bd6777974a75faf1c98683e838d1048eceac3e57
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = 66782e7dce1533d4ccce1ab7518f9760c50ec675
-SHA1 (patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp) = d85c0f49758438a2541567ad6a9972e40d076d6e
-SHA1 (patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp) = 6dcdcb75bc4a97244e13d3419450c8aae9f7989a
diff --git a/lldb-netbsd/patches/patch-source_Host_common_Host.cpp b/lldb-netbsd/patches/patch-source_Host_common_Host.cpp
deleted file mode 100644
index 8fb23c37cf..0000000000
--- a/lldb-netbsd/patches/patch-source_Host_common_Host.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- source/Host/common/Host.cpp.orig	2017-02-01 14:45:44.000000000 +0000
-+++ source/Host/common/Host.cpp
-@@ -700,7 +700,7 @@ Error Host::LaunchProcessPosixSpawn(cons
-   sigemptyset(&no_signals);
-   sigfillset(&all_signals);
-   ::posix_spawnattr_setsigmask(&attr, &no_signals);
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
-   ::posix_spawnattr_setsigdefault(&attr, &no_signals);
- #else
-   ::posix_spawnattr_setsigdefault(&attr, &all_signals);
diff --git a/lldb-netbsd/patches/patch-source_Plugins_DynamicLoader_POSIX-DYLD_DYLDRendezvous.cpp b/lldb-netbsd/patches/patch-source_Plugins_DynamicLoader_POSIX-DYLD_DYLDRendezvous.cpp
deleted file mode 100644
index 7d0de23e38..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_DynamicLoader_POSIX-DYLD_DYLDRendezvous.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp.orig	2017-03-23 15:49:52.000000000 +0000
-+++ source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
-@@ -379,12 +379,13 @@ bool DYLDRendezvous::RemoveSOEntries() {
- }
- 
- bool DYLDRendezvous::SOEntryIsMainExecutable(const SOEntry &entry) {
--  // On Linux the executable is indicated by an empty path in the entry. On
--  // FreeBSD and on Android it is the full path to the executable.
-+  // On some systes the executable is indicated by an empty path in the entry.
-+  // On others it is the full path to the executable.
- 
-   auto triple = m_process->GetTarget().GetArchitecture().GetTriple();
-   switch (triple.getOS()) {
-   case llvm::Triple::FreeBSD:
-+  case llvm::Triple::NetBSD:
-     return entry.file_spec == m_exe_file_spec;
-   case llvm::Triple::Linux:
-     if (triple.isAndroid())
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
deleted file mode 100644
index 9533f91b54..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig	2017-03-29 00:14:15.000000000 +0000
-+++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
-@@ -235,6 +235,24 @@ void NativeProcessNetBSD::MonitorSIGTRAP
-       }
-       SetState(StateType::eStateStopped, true);
-       break;
-+    case TRAP_TRACE:
-+      for (const auto &thread_sp : m_threads) {
-+        static_pointer_cast<NativeThreadNetBSD>(thread_sp)->SetStoppedByTrace();
-+      }
-+      SetState(StateType::eStateStopped, true);
-+      break;
-+    case TRAP_EXEC: {
-+      Error error = ReinitializeThreads();
-+      if (error.Fail()) {
-+        SetState(StateType::eStateInvalid);
-+        return;
-+      }
-+
-+      // Let our delegate know we have just exec'd.
-+      NotifyDidExec();
-+
-+      SetState(StateType::eStateStopped, true);
-+    } break;
-     }
-   }
- }
-@@ -389,11 +407,13 @@ Error NativeProcessNetBSD::Resume(const 
-     return Error();
-   }
- 
-+  Error error;
-+
-   switch (action->state) {
-   case eStateRunning: {
-     // Run the thread, possibly feeding it the signal.
--    Error error = NativeProcessNetBSD::PtraceWrapper(PT_CONTINUE, GetID(),
--                                                     (void *)1, action->signal);
-+    error = NativeProcessNetBSD::PtraceWrapper(PT_CONTINUE, GetID(), (void *)1,
-+                                               action->signal);
-     if (!error.Success())
-       return error;
-     for (const auto &thread_sp : m_threads) {
-@@ -403,7 +423,15 @@ Error NativeProcessNetBSD::Resume(const 
-     break;
-   }
-   case eStateStepping:
--    return Error("Not implemented");
-+    // Run the thread, possibly feeding it the signal.
-+    error = NativeProcessNetBSD::PtraceWrapper(PT_STEP, GetID(), (void *)1,
-+                                               action->signal);
-+    if (!error.Success())
-+      return error;
-+    for (const auto &thread_sp : m_threads) {
-+      static_pointer_cast<NativeThreadNetBSD>(thread_sp)->SetStepping();
-+    }
-+    SetState(eStateStepping, true);
-     break;
- 
-   case eStateSuspended:
-@@ -732,22 +760,11 @@ Error NativeProcessNetBSD::LaunchInferio
- 
-   ResolveProcessArchitecture(m_pid, m_arch);
- 
--  /* Initialize threads */
--  struct ptrace_lwpinfo info = {};
--  error = PtraceWrapper(PT_LWPINFO, pid, &info, sizeof(info));
-+  error = ReinitializeThreads();
-   if (error.Fail()) {
-     SetState(StateType::eStateInvalid);
-     return error;
-   }
--  while (info.pl_lwpid != 0) {
--    NativeThreadNetBSDSP thread_sp = AddThread(info.pl_lwpid);
--    thread_sp->SetStoppedBySignal(SIGSTOP);
--    error = PtraceWrapper(PT_LWPINFO, pid, &info, sizeof(info));
--    if (error.Fail()) {
--      SetState(StateType::eStateInvalid);
--      return error;
--    }
--  }
- 
-   /* Set process stopped */
-   SetState(StateType::eStateStopped);
-@@ -850,9 +867,6 @@ NativeThreadNetBSDSP NativeProcessNetBSD
- ::pid_t NativeProcessNetBSD::Attach(lldb::pid_t pid, Error &error) {
-   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
- 
--  // Use a map to keep track of the threads which we have attached/need to
--  // attach.
--  Host::TidMap tids_to_attach;
-   if (pid <= 1) {
-     error.SetErrorToGenericError();
-     error.SetErrorString("Attaching to process 1 is not allowed.");
-@@ -874,21 +888,11 @@ NativeThreadNetBSDSP NativeProcessNetBSD
-   m_pid = pid;
- 
-   /* Initialize threads */
--  struct ptrace_lwpinfo info = {};
--  error = PtraceWrapper(PT_LWPINFO, pid, &info, sizeof(info));
-+  error = ReinitializeThreads();
-   if (error.Fail()) {
-     SetState(StateType::eStateInvalid);
-     return -1;
-   }
--  while (info.pl_lwpid != 0) {
--    NativeThreadNetBSDSP thread_sp = AddThread(info.pl_lwpid);
--    thread_sp->SetStoppedBySignal(SIGSTOP);
--    error = PtraceWrapper(PT_LWPINFO, pid, &info, sizeof(info));
--    if (error.Fail()) {
--      SetState(StateType::eStateInvalid);
--      return -1;
--    }
--  }
- 
-   // Let our process instance know the thread has stopped.
-   SetState(StateType::eStateStopped);
-@@ -989,3 +993,26 @@ NativeProcessNetBSD::GetAuxvData() const
- 
-   return buf;
- }
-+
-+Error NativeProcessNetBSD::ReinitializeThreads() {
-+  // Clear old threads
-+  m_threads.clear();
-+
-+  // Initialize new thread
-+  struct ptrace_lwpinfo info = {};
-+  Error error = PtraceWrapper(PT_LWPINFO, GetID(), &info, sizeof(info));
-+  if (error.Fail()) {
-+    return error;
-+  }
-+  // Reinitialize from scratch threads and register them in process
-+  while (info.pl_lwpid != 0) {
-+    NativeThreadNetBSDSP thread_sp = AddThread(info.pl_lwpid);
-+    thread_sp->SetStoppedByExec();
-+    error = PtraceWrapper(PT_LWPINFO, GetID(), &info, sizeof(info));
-+    if (error.Fail()) {
-+      return error;
-+    }
-+  }
-+
-+  return error;
-+}
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
deleted file mode 100644
index f62f1ca800..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/NetBSD/NativeProcessNetBSD.h.orig	2017-03-29 00:14:15.000000000 +0000
-+++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
-@@ -131,6 +131,8 @@ private:
-   void SigchldHandler();
- 
-   ::pid_t Attach(lldb::pid_t pid, Error &error);
-+
-+  Error ReinitializeThreads();
- };
- 
- } // namespace process_netbsd
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
deleted file mode 100644
index 5e04a7c5f4..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp.orig	2017-03-29 00:14:15.000000000 +0000
-+++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
-@@ -41,6 +41,22 @@ Error NativeRegisterContextNetBSD::Write
-   return DoWriteGPR(buf);
- }
- 
-+Error NativeRegisterContextNetBSD::ReadFPR() {
-+  void *buf = GetFPRBuffer();
-+  if (!buf)
-+    return Error("FPR buffer is NULL");
-+
-+  return DoReadFPR(buf);
-+}
-+
-+Error NativeRegisterContextNetBSD::WriteFPR() {
-+  void *buf = GetFPRBuffer();
-+  if (!buf)
-+    return Error("FPR buffer is NULL");
-+
-+  return DoWriteFPR(buf);
-+}
-+
- Error NativeRegisterContextNetBSD::DoReadGPR(void *buf) {
-   return NativeProcessNetBSD::PtraceWrapper(PT_GETREGS, GetProcessPid(), buf,
-                                             m_thread.GetID());
-@@ -51,6 +67,16 @@ Error NativeRegisterContextNetBSD::DoWri
-                                             m_thread.GetID());
- }
- 
-+Error NativeRegisterContextNetBSD::DoReadFPR(void *buf) {
-+  return NativeProcessNetBSD::PtraceWrapper(PT_GETFPREGS, GetProcessPid(), buf,
-+                                            m_thread.GetID());
-+}
-+
-+Error NativeRegisterContextNetBSD::DoWriteFPR(void *buf) {
-+  return NativeProcessNetBSD::PtraceWrapper(PT_SETFPREGS, GetProcessPid(), buf,
-+                                            m_thread.GetID());
-+}
-+
- NativeProcessNetBSD &NativeRegisterContextNetBSD::GetProcess() {
-   auto process_sp =
-       std::static_pointer_cast<NativeProcessNetBSD>(m_thread.GetProcess());
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
deleted file mode 100644
index 9fbb4f0430..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h.orig	2017-03-29 00:14:15.000000000 +0000
-+++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
-@@ -37,13 +37,24 @@ public:
- protected:
-   virtual Error ReadGPR();
-   virtual Error WriteGPR();
-+
-+  virtual Error ReadFPR();
-+  virtual Error WriteFPR();
-+
-   virtual void *GetGPRBuffer() { return nullptr; }
-   virtual size_t GetGPRSize() {
-     return GetRegisterInfoInterface().GetGPRSize();
-   }
-+
-+  virtual void *GetFPRBuffer() { return nullptr; }
-+  virtual size_t GetFPRSize() { return 0; }
-+
-   virtual Error DoReadGPR(void *buf);
-   virtual Error DoWriteGPR(void *buf);
- 
-+  virtual Error DoReadFPR(void *buf);
-+  virtual Error DoWriteFPR(void *buf);
-+
-   virtual NativeProcessNetBSD &GetProcess();
-   virtual ::pid_t GetProcessPid();
- };
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp
deleted file mode 100644
index b55dc0ae05..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp.orig	2017-03-29 00:14:15.000000000 +0000
-+++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
-@@ -154,6 +154,9 @@ int NativeRegisterContextNetBSD_x86_64::
-   case GPRegSet:
-     ReadGPR();
-     return 0;
-+  case FPRegSet:
-+    ReadFPR();
-+    return 0;
-   default:
-     break;
-   }
-@@ -164,6 +167,9 @@ int NativeRegisterContextNetBSD_x86_64::
-   case GPRegSet:
-     WriteGPR();
-     return 0;
-+  case FPRegSet:
-+    WriteFPR();
-+    return 0;
-   default:
-     break;
-   }
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h
deleted file mode 100644
index 8371e22c58..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h.orig	2017-03-29 00:14:15.000000000 +0000
-+++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
-@@ -48,13 +48,15 @@ public:
- 
- protected:
-   void *GetGPRBuffer() override { return &m_gpr_x86_64; }
-+  void *GetFPRBuffer() override { return &m_fpr_x86_64; }
- 
- private:
-   // Private member types.
--  enum { GPRegSet };
-+  enum { GPRegSet, FPRegSet };
- 
-   // Private member variables.
-   struct reg m_gpr_x86_64;
-+  struct fpreg m_fpr_x86_64;
- 
-   int GetSetForNativeRegNum(int reg_num) const;
- 
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
deleted file mode 100644
index c7dc813376..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp.orig	2017-03-29 00:14:15.000000000 +0000
-+++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
-@@ -56,6 +56,18 @@ void NativeThreadNetBSD::SetStoppedByBre
-   m_stop_info.details.signal.signo = SIGTRAP;
- }
- 
-+void NativeThreadNetBSD::SetStoppedByTrace() {
-+  SetStopped();
-+  m_stop_info.reason = StopReason::eStopReasonTrace;
-+  m_stop_info.details.signal.signo = SIGTRAP;
-+}
-+
-+void NativeThreadNetBSD::SetStoppedByExec() {
-+  SetStopped();
-+  m_stop_info.reason = StopReason::eStopReasonExec;
-+  m_stop_info.details.signal.signo = SIGTRAP;
-+}
-+
- void NativeThreadNetBSD::SetStopped() {
-   const StateType new_state = StateType::eStateStopped;
-   m_state = new_state;
-@@ -67,6 +79,11 @@ void NativeThreadNetBSD::SetRunning() {
-   m_stop_info.reason = StopReason::eStopReasonNone;
- }
- 
-+void NativeThreadNetBSD::SetStepping() {
-+  m_state = StateType::eStateStepping;
-+  m_stop_info.reason = StopReason::eStopReasonNone;
-+}
-+
- std::string NativeThreadNetBSD::GetName() { return std::string(""); }
- 
- lldb::StateType NativeThreadNetBSD::GetState() { return m_state; }
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
deleted file mode 100644
index adb9a201db..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/NetBSD/NativeThreadNetBSD.h.orig	2017-03-29 00:14:15.000000000 +0000
-+++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
-@@ -51,8 +51,11 @@ private:
- 
-   void SetStoppedBySignal(uint32_t signo, const siginfo_t *info = nullptr);
-   void SetStoppedByBreakpoint();
-+  void SetStoppedByTrace();
-+  void SetStoppedByExec();
-   void SetStopped();
-   void SetRunning();
-+  void SetStepping();
- 
-   // ---------------------------------------------------------------------
-   // Member Variables
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp
deleted file mode 100644
index 67b1a7a916..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/elf-core/ProcessElfCore.cpp.orig	2017-03-26 19:17:32.000000000 +0000
-+++ source/Plugins/Process/elf-core/ProcessElfCore.cpp
-@@ -62,8 +62,8 @@ lldb::ProcessSP ProcessElfCore::CreateIn
-     // to ignore possible presence of the header extension.
-     const size_t header_size = sizeof(llvm::ELF::Elf64_Ehdr);
- 
--    auto data_sp =
--        DataBufferLLVM::CreateSliceFromPath(crash_file->GetPath(), header_size, 0);
-+    auto data_sp = DataBufferLLVM::CreateSliceFromPath(crash_file->GetPath(),
-+                                                       header_size, 0);
-     if (data_sp && data_sp->GetByteSize() == header_size &&
-         elf::ELFHeader::MagicBytesMatch(data_sp->GetBytes())) {
-       elf::ELFHeader elf_header;
-@@ -223,7 +223,7 @@ Error ProcessElfCore::DoLoadCore() {
-   bool siginfo_signal_found = false;
-   bool prstatus_signal_found = false;
-   // Check we found a signal in a SIGINFO note.
--  for (const auto &thread_data: m_thread_data) {
-+  for (const auto &thread_data : m_thread_data) {
-     if (thread_data.signo != 0)
-       siginfo_signal_found = true;
-     if (thread_data.prstatus_sig != 0)
-@@ -233,7 +233,7 @@ Error ProcessElfCore::DoLoadCore() {
-     // If we don't have signal from SIGINFO use the signal from each threads
-     // PRSTATUS note.
-     if (prstatus_signal_found) {
--      for (auto &thread_data: m_thread_data)
-+      for (auto &thread_data : m_thread_data)
-         thread_data.signo = thread_data.prstatus_sig;
-     } else if (m_thread_data.size() > 0) {
-       // If all else fails force the first thread to be SIGSTOP
-@@ -449,6 +449,11 @@ enum {
- };
- }
- 
-+namespace NETBSD {
-+
-+enum { NT_PROCINFO = 1, NT_AUXV, NT_AMD64_REGS = 33, NT_AMD64_FPREGS = 35 };
-+}
-+
- // Parse a FreeBSD NT_PRSTATUS note - see FreeBSD sys/procfs.h for details.
- static void ParseFreeBSDPrStatus(ThreadData &thread_data, DataExtractor &data,
-                                  ArchSpec &arch) {
-@@ -485,13 +490,23 @@ static void ParseFreeBSDThrMisc(ThreadDa
-   thread_data.name = data.GetCStr(&offset, 20);
- }
- 
--static void ParseOpenBSDProcInfo(ThreadData &thread_data, DataExtractor &data)
--{
-+static void ParseNetBSDProcInfo(ThreadData &thread_data, DataExtractor &data) {
-+  lldb::offset_t offset = 0;
-+
-+  int version = data.GetU32(&offset);
-+  if (version != 1)
-+    return;
-+
-+  offset += 4;
-+  thread_data.signo = data.GetU32(&offset);
-+}
-+
-+static void ParseOpenBSDProcInfo(ThreadData &thread_data, DataExtractor &data) {
-   lldb::offset_t offset = 0;
--  
-+
-   int version = data.GetU32(&offset);
-   if (version != 1)
--	  return;
-+    return;
- 
-   offset += 4;
-   thread_data.signo = data.GetU32(&offset);
-@@ -585,23 +600,38 @@ Error ProcessElfCore::ParseThreadContext
-       default:
-         break;
-       }
-+    } else if (note.n_name.substr(0, 11) == "NetBSD-CORE") {
-+      // NetBSD per-thread information is stored in notes named
-+      // "NetBSD-CORE@nnn" so match on the initial part of the string.
-+      m_os = llvm::Triple::NetBSD;
-+      if (note.n_type == NETBSD::NT_PROCINFO) {
-+        ParseNetBSDProcInfo(*thread_data, note_data);
-+      } else if (note.n_type == NETBSD::NT_AUXV) {
-+        m_auxv = DataExtractor(note_data);
-+      } else if (arch.GetMachine() == llvm::Triple::x86_64 &&
-+                 note.n_type == NETBSD::NT_AMD64_REGS) {
-+        thread_data->gpregset = note_data;
-+      } else if (arch.GetMachine() == llvm::Triple::x86_64 &&
-+                 note.n_type == NETBSD::NT_AMD64_FPREGS) {
-+        thread_data->fpregset = note_data;
-+      }
-     } else if (note.n_name.substr(0, 7) == "OpenBSD") {
-       // OpenBSD per-thread information is stored in notes named
-       // "OpenBSD@nnn" so match on the initial part of the string.
-       m_os = llvm::Triple::OpenBSD;
-       switch (note.n_type) {
-       case NT_OPENBSD_PROCINFO:
--	ParseOpenBSDProcInfo(*thread_data, note_data);
--	break;
-+        ParseOpenBSDProcInfo(*thread_data, note_data);
-+        break;
-       case NT_OPENBSD_AUXV:
--	m_auxv = DataExtractor(note_data);
--	break;
-+        m_auxv = DataExtractor(note_data);
-+        break;
-       case NT_OPENBSD_REGS:
--	thread_data->gpregset = note_data;
--	break;
-+        thread_data->gpregset = note_data;
-+        break;
-       case NT_OPENBSD_FPREGS:
--	thread_data->fpregset = note_data;
--	break;
-+        thread_data->fpregset = note_data;
-+        break;
-       }
-     } else if (note.n_name == "CORE") {
-       switch (note.n_type) {
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp
deleted file mode 100644
index 2fa2f6130c..0000000000
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-$NetBSD$
-
---- source/Plugins/Process/elf-core/ThreadElfCore.cpp.orig	2017-03-26 19:17:32.000000000 +0000
-+++ source/Plugins/Process/elf-core/ThreadElfCore.cpp
-@@ -21,6 +21,7 @@
- #include "Plugins/Process/Utility/RegisterContextLinux_i386.h"
- #include "Plugins/Process/Utility/RegisterContextLinux_s390x.h"
- #include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
-+#include "Plugins/Process/Utility/RegisterContextNetBSD_x86_64.h"
- #include "Plugins/Process/Utility/RegisterContextOpenBSD_i386.h"
- #include "Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.h"
- #include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h"
-@@ -112,6 +113,17 @@ ThreadElfCore::CreateRegisterContextForF
-       break;
-     }
- 
-+    case llvm::Triple::NetBSD: {
-+      switch (arch.GetMachine()) {
-+      case llvm::Triple::x86_64:
-+        reg_interface = new RegisterContextNetBSD_x86_64(arch);
-+        break;
-+      default:
-+        break;
-+      }
-+      break;
-+    }
-+
-     case llvm::Triple::Linux: {
-       switch (arch.GetMachine()) {
-       case llvm::Triple::arm:
-@@ -144,8 +156,8 @@ ThreadElfCore::CreateRegisterContextForF
-         reg_interface = new RegisterInfoPOSIX_arm(arch);
-         break;
-       case llvm::Triple::x86:
--	reg_interface = new RegisterContextOpenBSD_i386(arch);
--	break;
-+        reg_interface = new RegisterContextOpenBSD_i386(arch);
-+        break;
-       case llvm::Triple::x86_64:
-         reg_interface = new RegisterContextOpenBSD_x86_64(arch);
-         break;
-@@ -260,7 +272,6 @@ Error ELFLinuxPrStatus::Parse(DataExtrac
-   pr_cstime.tv_sec = data.GetPointer(&offset);
-   pr_cstime.tv_usec = data.GetPointer(&offset);
- 
--
-   return error;
- }
- 
-@@ -317,9 +328,7 @@ Error ELFLinuxPrPsInfo::Parse(DataExtrac
- //----------------------------------------------------------------
- // Parse SIGINFO from NOTE entry
- //----------------------------------------------------------------
--ELFLinuxSigInfo::ELFLinuxSigInfo() {
--  memset(this, 0, sizeof(ELFLinuxSigInfo));
--}
-+ELFLinuxSigInfo::ELFLinuxSigInfo() { memset(this, 0, sizeof(ELFLinuxSigInfo)); }
- 
- Error ELFLinuxSigInfo::Parse(DataExtractor &data, const ArchSpec &arch) {
-   Error error;


Home | Main Index | Thread Index | Old Index