pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lldb-netbsd: Cleanup code
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Fri Mar 3 17:58:25 2017 +0100
Changeset: e27f38daefe35c0256d7264ce1b4fb12aae606c6
Modified Files:
lldb-netbsd/distinfo
lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
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
Log Message:
lldb-netbsd: Cleanup code
Should not be functional change.
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=e27f38daefe35c0256d7264ce1b4fb12aae606c6
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
lldb-netbsd/distinfo | 8 +++---
..._Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 2 +-
..._Process_NetBSD_NativeRegisterContextNetBSD.cpp | 31 +++++++++------------
...ns_Process_NetBSD_NativeRegisterContextNetBSD.h | 6 ++--
...NetBSD_NativeRegisterContextNetBSD__x86__64.cpp | 32 +++++-----------------
5 files changed, 29 insertions(+), 50 deletions(-)
diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 6531bafdd7..01387315df 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -23,11 +23,11 @@ SHA1 (patch-source_Host_netbsd_ThisThread.cpp) = f0d32c81bc1b8fe9aeb86519ea46ba2
SHA1 (patch-source_Initialization_SystemInitializerCommon.cpp) = dc270227e68c655753ef5f5168e3fa9a8dab3696
SHA1 (patch-source_Plugins_Process_CMakeLists.txt) = c689ff4ec455234f8d506dc9eb8e0ed7f750d426
SHA1 (patch-source_Plugins_Process_NetBSD_CMakeLists.txt) = a77f397020ab752875813a7a93b53ccd3a130e6f
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 3448568427c7570a1996368631b8b07b5a2bb3dc
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 64ad94ee859712090bebd1e9dbf79d4add4de448
SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = c48bb2dd45682164ab904b8b3f7664b91ac35d5b
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = b15ba9af606d18188dfac0e8ee39f88eae37e8f9
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = e27bbdced40cce10524ac00e91480d0d84195722
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = a5db8c3cf6cd7157093bf77944722f88cbff6325
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = d3ba093e776ce3af1a6d6f5f5263e5535f8cdec9
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = c9bd447b3a5e70475d1b857c5441a59c7b2a54ba
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = e937316bee978570c9fe27caa859ba5d35763761
SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h) = 58803697f65411d1ad62e45c6af68c9271633bac
SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = cb8757705327e62273bfe9a84dbdbf9cb9b0751a
SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = c675af8495a75f99bb60cb4ab3fa36223f1cb6f4
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 6742a7746a..837c948071 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -1,6 +1,6 @@
$NetBSD$
---- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig 2017-03-03 07:28:57.322494582 +0000
+--- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig 2017-03-03 15:35:02.252988829 +0000
+++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
@@ -0,0 +1,1307 @@
+//===-- NativeProcessNetBSD.cpp -------------------------------- -*- C++ -*-===//
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 9415786848..f93567d9c4 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp
@@ -1,8 +1,8 @@
$NetBSD$
---- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp.orig 2017-03-01 11:04:39.184136620 +0000
+--- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp.orig 2017-03-03 15:35:02.265865750 +0000
+++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
-@@ -0,0 +1,116 @@
+@@ -0,0 +1,111 @@
+//===-- NativeRegisterContextNetBSD.cpp --------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
@@ -82,34 +82,22 @@ $NetBSD$
+}
+
+Error NativeRegisterContextNetBSD::DoReadGPR(void *buf) {
-+ NativeProcessNetBSD &process = GetProcess();
-+ lldb::pid_t pid = process.GetID();
-+
-+ return NativeProcessNetBSD::PtraceWrapper(PT_GETREGS, pid,
++ return NativeProcessNetBSD::PtraceWrapper(PT_GETREGS, GetProcessPid(),
+ buf, m_thread.GetID());
+}
+
+Error NativeRegisterContextNetBSD::DoWriteGPR(void *buf) {
-+ NativeProcessNetBSD &process = GetProcess();
-+ lldb::pid_t pid = process.GetID();
-+
-+ return NativeProcessNetBSD::PtraceWrapper(PT_SETREGS, pid,
++ return NativeProcessNetBSD::PtraceWrapper(PT_SETREGS, GetProcessPid(),
+ buf, m_thread.GetID());
+}
+
+Error NativeRegisterContextNetBSD::DoReadFPR(void *buf) {
-+ NativeProcessNetBSD &process = GetProcess();
-+ lldb::pid_t pid = process.GetID();
-+
-+ return NativeProcessNetBSD::PtraceWrapper(PT_GETFPREGS, pid,
++ return NativeProcessNetBSD::PtraceWrapper(PT_GETFPREGS, GetProcessPid(),
+ buf, m_thread.GetID());
+}
+
+Error NativeRegisterContextNetBSD::DoWriteFPR(void *buf) {
-+ NativeProcessNetBSD &process = GetProcess();
-+ lldb::pid_t pid = process.GetID();
-+
-+ return NativeProcessNetBSD::PtraceWrapper(PT_SETFPREGS, pid,
++ return NativeProcessNetBSD::PtraceWrapper(PT_SETFPREGS, GetProcessPid(),
+ buf, m_thread.GetID());
+}
+
@@ -119,3 +107,10 @@ $NetBSD$
+ assert(process_sp);
+ return *process_sp;
+}
++
++pid_t NativeRegisterContextNetBSD::GetProcessPid() {
++ NativeProcessNetBSD &process = GetProcess();
++ lldb::pid_t pid = process.GetID();
++
++ return pid;
++}
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 ed0d266fbd..f75aed8ed3 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h
@@ -1,8 +1,8 @@
$NetBSD$
---- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h.orig 2017-03-01 11:04:42.048407244 +0000
+--- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h.orig 2017-03-03 15:35:02.272170791 +0000
+++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
-@@ -0,0 +1,74 @@
+@@ -0,0 +1,76 @@
+//===-- NativeRegisterContextNetBSD.h ----------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
@@ -71,6 +71,8 @@ $NetBSD$
+ virtual Error DoWriteFPR(void *buf);
+
+ virtual NativeProcessNetBSD &GetProcess();
++
++ virtual pid_t GetProcessPid();
+};
+
+} // namespace process_netbsd
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
index 7a142d4833..a7f394d74e 100644
--- 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
@@ -1,8 +1,8 @@
$NetBSD$
---- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp.orig 2017-03-01 11:04:48.447830223 +0000
+--- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp.orig 2017-03-03 15:35:02.278989585 +0000
+++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
-@@ -0,0 +1,1014 @@
+@@ -0,0 +1,996 @@
+//===-- NativeRegisterContextNetBSD_x86_64.cpp ---------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
@@ -214,15 +214,6 @@ $NetBSD$
+#define REG_CONTEXT_SIZE (GetRegisterInfoInterface().GetGPRSize() + sizeof(FPR))
+
+// ----------------------------------------------------------------------------
-+// Required MPX define.
-+// ----------------------------------------------------------------------------
-+
-+// Support MPX extensions also if compiled with compiler without MPX support.
-+#ifndef bit_MPX
-+#define bit_MPX 0x4000
-+#endif
-+
-+// ----------------------------------------------------------------------------
+// XCR0 extended register sets masks.
+// ----------------------------------------------------------------------------
+#define mask_XSTATE_AVX (1ULL << 2)
@@ -244,20 +235,11 @@ $NetBSD$
+
+static RegisterInfoInterface *
+CreateRegisterInfoInterface(const ArchSpec &target_arch) {
-+#if 0
-+ if (HostInfo::GetArchitecture().GetAddressByteSize() == 4) {
-+ // 32-bit hosts run with a RegisterContextNetBSD_i386 context.
-+ return new RegisterContextNetBSD_i386(target_arch);
-+ } else {
-+#endif
-+ assert((HostInfo::GetArchitecture().GetAddressByteSize() == 8) &&
-+ "Register setting path assumes this is a 64-bit host");
-+ // X86_64 hosts know how to work with 64-bit and 32-bit EXEs using the
-+ // x86_64 register context.
-+ return new RegisterContextNetBSD_x86_64(target_arch);
-+#if 0
-+ }
-+#endif
++ assert((HostInfo::GetArchitecture().GetAddressByteSize() == 8) &&
++ "Register setting path assumes this is a 64-bit host");
++ // X86_64 hosts know how to work with 64-bit and 32-bit EXEs using the
++ // x86_64 register context.
++ return new RegisterContextNetBSD_x86_64(target_arch);
+}
+
+NativeRegisterContextNetBSD_x86_64::NativeRegisterContextNetBSD_x86_64(
Home |
Main Index |
Thread Index |
Old Index