pkgsrc-WIP-changes archive

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

lldb-netbsd: Rebase NativeProcessNetBSD to SVN trunk



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Mar 21 23:21:42 2017 +0100
Changeset:	e98449a93fcbb51bfa516453a0d33222c5dab380

Modified Files:
	lldb-netbsd/distinfo
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
Added Files:
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_CMakeLists.txt

Log Message:
lldb-netbsd: Rebase NativeProcessNetBSD to SVN trunk

This has not been tested for building as other files are still needed to be
restored after the initial NativeProcessNetBSD merged upstream.

Restore x86_64 Native Register Plugin in CMakeList.txt.

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=e98449a93fcbb51bfa516453a0d33222c5dab380

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

diffstat:
 lldb-netbsd/distinfo                               |  5 +-
 ...ch-source_Plugins_Process_NetBSD_CMakeLists.txt | 12 +++
 ..._Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 87 +++-------------------
 ...ce_Plugins_Process_NetBSD_NativeProcessNetBSD.h | 69 +++--------------
 4 files changed, 33 insertions(+), 140 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 64cfad3dbc..249a41abdb 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -17,8 +17,9 @@ SHA1 (patch-source_Host_common_Host.cpp) = 7d48b8bb1e4350ba6d3ddc6357b9b8dc82d6b
 SHA1 (patch-source_Host_common_NativeProcessProtocol.cpp) = 23cc7da280b2123cf0206f3d5660d2647935edbc
 SHA1 (patch-source_Host_netbsd_Host.cpp) = 92ea9aa9c21d11126e7532a860e59f408175d8d4
 SHA1 (patch-source_Plugins_DynamicLoader_POSIX-DYLD_DYLDRendezvous.cpp) = 32d683eb388ded96e7f9aedec827202b5b056392
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 240348276e7dbb664d4372c00f1191d4bfc47a3d
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = f598dd24e1652ceca236d8db3604cbadce68f5be
+SHA1 (patch-source_Plugins_Process_NetBSD_CMakeLists.txt) = 558379a5f3b47235dbf670742467e64c05e5900f
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = ad525be4f4fda8760b07eb38fa5d711453198d49
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = 3c9d87046a4399f4ca8a48721b81b49b416ac3e0
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = 4625b126e809507c433b10f538b9e533cb42f4ec
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = 20ff7cf3e3ea20d225edc8dab0a7473baf9fe3ce
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = f6aaa6193389041476a05f022ad55e18b4ec0e20
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_CMakeLists.txt b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_CMakeLists.txt
new file mode 100644
index 0000000000..2dc8d0e5a4
--- /dev/null
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_CMakeLists.txt
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- source/Plugins/Process/NetBSD/CMakeLists.txt.orig	2017-03-21 20:01:05.000000000 +0000
++++ source/Plugins/Process/NetBSD/CMakeLists.txt
+@@ -6,6 +6,7 @@ add_lldb_library(lldbPluginProcessNetBSD
+   NativeProcessNetBSD.cpp
+   NativeRegisterContextNetBSD.cpp
+   NativeThreadNetBSD.cpp
++  NativeRegisterContextNetBSD_x86_64.cpp
+ 
+   LINK_LIBS
+     lldbCore
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
index fdb135ec31..85b655d1d0 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -2,77 +2,14 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig	2017-03-21 20:01:05.000000000 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
-@@ -1,3 +1,1417 @@
-+//===-- NativeProcessNetBSD.cpp -------------------------------- -*- C++ -*-===//
-+//
-+//                     The LLVM Compiler Infrastructure
-+//
-+// This file is distributed under the University of Illinois Open Source
-+// License. See LICENSE.TXT for details.
-+//
-+//===----------------------------------------------------------------------===//
-+
-+#include "NativeProcessNetBSD.h"
-+
-+// C Includes
-+#include <sys/param.h>
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#include <uvm/uvm_prot.h>
-+#include <elf.h>
-+#include <errno.h>
-+#include <stdint.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <util.h>
-+
-+// C++ Includes
-+#include <fstream>
-+#include <mutex>
-+#include <sstream>
-+#include <string>
-+#include <unordered_map>
-+
-+
-+// Other libraries and framework includes
-+#include "lldb/Core/EmulateInstruction.h"
-+#include "lldb/Utility/Error.h"
-+#include "lldb/Core/ModuleSpec.h"
-+#include "lldb/Core/RegisterValue.h"
-+#include "lldb/Core/State.h"
-+#include "lldb/Host/Host.h"
-+#include "lldb/Host/HostProcess.h"
-+#include "lldb/Host/ThreadLauncher.h"
-+#include "lldb/Host/common/NativeBreakpoint.h"
-+#include "lldb/Host/common/NativeRegisterContext.h"
-+#include "lldb/Host/posix/ProcessLauncherPosixFork.h"
-+#include "lldb/Symbol/ObjectFile.h"
-+#include "lldb/Target/Process.h"
-+#include "lldb/Target/ProcessLaunchInfo.h"
-+#include "lldb/Target/Target.h"
-+#include "lldb/Utility/LLDBAssert.h"
-+#include "lldb/Host/PseudoTerminal.h"
-+#include "lldb/Utility/StringExtractor.h"
-+#include "lldb/Utility/DataBufferHeap.h"
-+
-+#include "NativeThreadNetBSD.h"
-+#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
-+
-+// System includes - They have to be included after framework includes because
-+// they define some
-+// macros which collide with variable names in other modules
-+#include <sys/socket.h>
-+
-+#include <sys/ptrace.h>
-+#include <sys/syscall.h>
-+#include <sys/types.h>
-+#include <sys/user.h>
-+#include <sys/wait.h>
-+
-+using namespace lldb;
-+using namespace lldb_private;
-+using namespace lldb_private::process_netbsd;
-+using namespace llvm;
+@@ -48,4 +48,1347 @@ Error NativeProcessProtocol::Attach(
+ // -----------------------------------------------------------------------------
+ 
+ NativeProcessNetBSD::NativeProcessNetBSD()
+-    : NativeProcessProtocol(LLDB_INVALID_PROCESS_ID) {}
++    : NativeProcessProtocol(LLDB_INVALID_PROCESS_ID), m_arch(),
++      m_supports_mem_region(eLazyBoolCalculate), m_mem_region_cache(),
++      m_pending_notification_tid(LLDB_INVALID_THREAD_ID) {}
 +
 +namespace {
 +void MaybeLogLaunchInfo(const ProcessLaunchInfo &info) {
@@ -268,10 +205,7 @@ $NetBSD$
 +// Public Instance Methods
 +// -----------------------------------------------------------------------------
 +
-+NativeProcessNetBSD::NativeProcessNetBSD()
-+    : NativeProcessProtocol(LLDB_INVALID_PROCESS_ID), m_arch(),
-+      m_supports_mem_region(eLazyBoolCalculate), m_mem_region_cache(),
-+      m_pending_notification_tid(LLDB_INVALID_THREAD_ID) {}
++
 +
 +void NativeProcessNetBSD::AttachToInferior(MainLoop &mainloop, lldb::pid_t pid,
 +                                          Error &error) {
@@ -1417,6 +1351,3 @@ $NetBSD$
 +
 +  return error;
 +}
- //===-- NativeProcessNetBSD.cpp ------------------------------- -*- C++ -*-===//
- //
- //                     The LLVM Compiler Infrastructure
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
index 0eb9e8327b..5aa6db6ad8 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
@@ -2,54 +2,10 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeProcessNetBSD.h.orig	2017-03-21 20:01:05.000000000 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
-@@ -1,3 +1,191 @@
-+//===-- NativeProcessNetBSD.h ---------------------------------- -*- C++ -*-===//
-+//
-+//                     The LLVM Compiler Infrastructure
-+//
-+// This file is distributed under the University of Illinois Open Source
-+// License. See LICENSE.TXT for details.
-+//
-+//===----------------------------------------------------------------------===//
-+
-+#ifndef liblldb_NativeProcessNetBSD_H_
-+#define liblldb_NativeProcessNetBSD_H_
-+
-+// C++ Includes
-+#include <unordered_set>
-+
-+// Other libraries and framework includes
-+#include "lldb/Core/ArchSpec.h"
-+#include "lldb/Host/Debug.h"
-+#include "lldb/Host/FileSpec.h"
-+#include "lldb/Host/HostThread.h"
-+#include "lldb/Target/MemoryRegionInfo.h"
-+#include "lldb/lldb-types.h"
-+
-+#include "NativeThreadNetBSD.h"
-+#include "lldb/Host/common/NativeProcessProtocol.h"
-+
-+namespace lldb_private {
-+class Error;
-+class Scalar;
-+
-+namespace process_netbsd {
-+/// @class NativeProcessNetBSD
-+/// @brief Manages communication with the inferior (debugee) process.
-+///
-+/// Upon construction, this class prepares and launches an inferior process for
-+/// debugging.
-+///
-+/// Changes in the inferior process state are broadcasted.
-+class NativeProcessNetBSD : public NativeProcessProtocol {
-+  friend Error NativeProcessProtocol::Launch(
-+      ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate,
-+      MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
-+
-+  friend Error NativeProcessProtocol::Attach(
-+      lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
-+      MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
-+
+@@ -39,8 +39,140 @@ class NativeProcessNetBSD : public Nativ
+       lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
+       MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
+ 
 +public:
 +  // ---------------------------------------------------------------------
 +  // NativeProcessProtocol Interface
@@ -120,7 +76,7 @@ $NetBSD$
 +                                  size_t &actual_opcode_size,
 +                                  const uint8_t *&trap_opcode_bytes) override;
 +
-+private:
+ private:
 +  MainLoop::SignalHandleUP m_sigchld_handle;
 +  ArchSpec m_arch;
 +
@@ -136,7 +92,7 @@ $NetBSD$
 +  // ---------------------------------------------------------------------
 +  // Private Instance Methods
 +  // ---------------------------------------------------------------------
-+  NativeProcessNetBSD();
+   NativeProcessNetBSD();
 +
 +  Error LaunchInferior(MainLoop &mainloop, ProcessLaunchInfo &launch_info);
 +
@@ -156,7 +112,6 @@ $NetBSD$
 +
 +  Error SetupSoftwareSingleStepping(NativeThreadNetBSD &thread);
 +
-+
 +  bool HasThreadNoLock(lldb::tid_t thread_id);
 +
 +  NativeThreadNetBSDSP AddThread(lldb::tid_t thread_id);
@@ -185,12 +140,6 @@ $NetBSD$
 +  void SigchldHandler();
 +
 +  Error PopulateMemoryRegionCache();
-+};
-+
-+} // namespace process_netbsd
-+} // namespace lldb_private
-+
-+#endif // #ifndef liblldb_NativeProcessNetBSD_H_
- //===-- NativeProcessNetBSD.h --------------------------------- -*- C++ -*-===//
- //
- //                     The LLVM Compiler Infrastructure
+ };
+ 
+ } // namespace process_netbsd


Home | Main Index | Thread Index | Old Index