pkgsrc-WIP-changes archive

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

lldb-netbsd: Kill more !GPR code



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Dec 18 02:30:17 2016 +0100
Changeset:	b1d44a3ee2c70b1931443698ef27c66b78a82913

Modified Files:
	lldb-netbsd/distinfo
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h

Log Message:
lldb-netbsd: Kill more !GPR code

FPR - Floating Point Registers - kill code to reduce the complexity of initial
porting to NetBSD.

RegisterSet is Linux specific way to query custom registers and other structs
from tracee.

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

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

diffstat:
 lldb-netbsd/distinfo                               |  4 +-
 ..._Process_NetBSD_NativeRegisterContextNetBSD.cpp | 44 +---------------------
 ...ns_Process_NetBSD_NativeRegisterContextNetBSD.h | 20 +---------
 3 files changed, 4 insertions(+), 64 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 1ee0e8f..995d794 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -20,8 +20,8 @@ SHA1 (patch-source_Plugins_Process_CMakeLists.txt) = c0168f81da56d9896eb414e6b8b
 SHA1 (patch-source_Plugins_Process_NetBSD_CMakeLists.txt) = 8c1d8274523f6ef4bce90caa6c981160ef930cb9
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = fc7a9b974719ed107025d6c248b7c68843f39624
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = 11641e9c3a5fdf4d9feb098c9c0bb2d9e05aa274
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = cf569f95362538af5a2709aab9ff61770744a78d
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = 558e8514b2a8f0595c0e375f308c53d8a9a6e9f1
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = 61512fb22cc5d1f4747a6af09d34723809fa8943
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = 2c45e7cd731a9c41fe14d866f9cd5ef5f838019b
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = 601b30ba2a3af18b6a6e8045d5a00415990c0fb1
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h) = b92d756199555c2ba890afa383808ec094266cf1
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = b524655c71f19fe579b68d0fe4802d727518b57b
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
index db4368b..697eb94 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp.orig	2016-12-17 13:23:23.783623245 +0000
 +++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
-@@ -0,0 +1,213 @@
+@@ -0,0 +1,171 @@
 +//===-- NativeRegisterContextNetBSD.cpp --------------------------*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -129,38 +129,6 @@ $NetBSD$
 +  return DoWriteGPR(buf, buf_size);
 +}
 +
-+Error NativeRegisterContextNetBSD::ReadFPR() {
-+  void *buf = GetFPRBuffer();
-+  if (!buf)
-+    return Error("FPR buffer is NULL");
-+  size_t buf_size = GetFPRSize();
-+
-+  return DoReadFPR(buf, buf_size);
-+}
-+
-+Error NativeRegisterContextNetBSD::WriteFPR() {
-+  void *buf = GetFPRBuffer();
-+  if (!buf)
-+    return Error("FPR buffer is NULL");
-+  size_t buf_size = GetFPRSize();
-+
-+  return DoWriteFPR(buf, buf_size);
-+}
-+
-+Error NativeRegisterContextNetBSD::ReadRegisterSet(void *buf, size_t buf_size,
-+                                                  unsigned int regset) {
-+  return NativeProcessNetBSD::PtraceWrapper(PTRACE_GETREGSET, m_thread.GetID(),
-+                                           static_cast<void *>(&regset), buf,
-+                                           buf_size);
-+}
-+
-+Error NativeRegisterContextNetBSD::WriteRegisterSet(void *buf, size_t buf_size,
-+                                                   unsigned int regset) {
-+  return NativeProcessNetBSD::PtraceWrapper(PTRACE_SETREGSET, m_thread.GetID(),
-+                                           static_cast<void *>(&regset), buf,
-+                                           buf_size);
-+}
-+
 +Error NativeRegisterContextNetBSD::DoReadRegisterValue(uint32_t offset,
 +                                                      const char *reg_name,
 +                                                      uint32_t size,
@@ -206,13 +174,3 @@ $NetBSD$
 +  return NativeProcessNetBSD::PtraceWrapper(PTRACE_SETREGS, m_thread.GetID(),
 +                                           nullptr, buf, buf_size);
 +}
-+
-+Error NativeRegisterContextNetBSD::DoReadFPR(void *buf, size_t buf_size) {
-+  return NativeProcessNetBSD::PtraceWrapper(PTRACE_GETFPREGS, m_thread.GetID(),
-+                                           nullptr, buf, buf_size);
-+}
-+
-+Error NativeRegisterContextNetBSD::DoWriteFPR(void *buf, size_t buf_size) {
-+  return NativeProcessNetBSD::PtraceWrapper(PTRACE_SETFPREGS, m_thread.GetID(),
-+                                           nullptr, buf, buf_size);
-+}
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
index 72abdbd..915403a 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h.orig	2016-12-17 13:23:23.783738014 +0000
 +++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
-@@ -0,0 +1,92 @@
+@@ -0,0 +1,74 @@
 +//===-- NativeRegisterContextNetBSD.h ----------------------------*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -49,30 +49,16 @@ $NetBSD$
 +  virtual Error WriteRegisterRaw(uint32_t reg_index,
 +                                 const RegisterValue &reg_value);
 +
-+  virtual Error ReadRegisterSet(void *buf, size_t buf_size,
-+                                unsigned int regset);
-+
-+  virtual Error WriteRegisterSet(void *buf, size_t buf_size,
-+                                 unsigned int regset);
-+
 +  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; }
-+
 +  // The Do*** functions are executed on the privileged thread and can perform
 +  // ptrace
 +  // operations directly.
@@ -85,10 +71,6 @@ $NetBSD$
 +  virtual Error DoReadGPR(void *buf, size_t buf_size);
 +
 +  virtual Error DoWriteGPR(void *buf, size_t buf_size);
-+
-+  virtual Error DoReadFPR(void *buf, size_t buf_size);
-+
-+  virtual Error DoWriteFPR(void *buf, size_t buf_size);
 +};
 +
 +} // namespace process_netbsd


Home | Main Index | Thread Index | Old Index