pkgsrc-WIP-changes archive

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

lldb-netbsd: Fix NetBSD core(5) files



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Apr 17 03:53:53 2017 +0200
Changeset:	79a947d067e8401361c240f908a745e992ee7480

Modified Files:
	lldb-netbsd/distinfo
Added Files:
	lldb-netbsd/patches/patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp

Log Message:
lldb-netbsd: Fix NetBSD core(5) files

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=79a947d067e8401361c240f908a745e992ee7480

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

diffstat:
 lldb-netbsd/distinfo                               |  1 +
 ...source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp | 49 ++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index a8f0e22b14..21953f16e1 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -12,6 +12,7 @@ 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_Plugins_ObjectFile_ELF_ObjectFileELF.cpp) = abb1eb0ae36864e89ffc3f5e5e1d7f6b51ed981f
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = e29554252e70fc9e1cb62b40ce32f93fad24d71b
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = abeb0ceb532831404f692f2e25532f81f2a83163
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = 30ef94fb108271313ec61cf4d293fe5d9709948b
diff --git a/lldb-netbsd/patches/patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp b/lldb-netbsd/patches/patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp
new file mode 100644
index 0000000000..372bf22423
--- /dev/null
+++ b/lldb-netbsd/patches/patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp
@@ -0,0 +1,49 @@
+$NetBSD$
+
+--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp.orig	2017-04-07 18:27:43.000000000 +0000
++++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+@@ -51,7 +51,7 @@ namespace {
+ // ELF note owner definitions
+ const char *const LLDB_NT_OWNER_FREEBSD = "FreeBSD";
+ const char *const LLDB_NT_OWNER_GNU = "GNU";
+-const char *const LLDB_NT_OWNER_NETBSD = "NetBSD";
++const char *const LLDB_NT_OWNER_NETBSD = "NetBSD-CORE";
+ const char *const LLDB_NT_OWNER_OPENBSD = "OpenBSD";
+ const char *const LLDB_NT_OWNER_CSR = "csr";
+ const char *const LLDB_NT_OWNER_ANDROID = "Android";
+@@ -67,9 +67,6 @@ const elf_word LLDB_NT_GNU_ABI_SIZE = 16
+ 
+ const elf_word LLDB_NT_GNU_BUILD_ID_TAG = 0x03;
+ 
+-const elf_word LLDB_NT_NETBSD_ABI_TAG = 0x01;
+-const elf_word LLDB_NT_NETBSD_ABI_SIZE = 4;
+-
+ // GNU ABI note OS constants
+ const elf_word LLDB_NT_GNU_ABI_OS_LINUX = 0x00;
+ const elf_word LLDB_NT_GNU_ABI_OS_HURD = 0x01;
+@@ -1371,24 +1368,10 @@ ObjectFileELF::RefineModuleDetailsFromNo
+         arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux);
+     }
+     // Process NetBSD ELF notes.
+-    else if ((note.n_name == LLDB_NT_OWNER_NETBSD) &&
+-             (note.n_type == LLDB_NT_NETBSD_ABI_TAG) &&
+-             (note.n_descsz == LLDB_NT_NETBSD_ABI_SIZE)) {
+-      // Pull out the min version info.
+-      uint32_t version_info;
+-      if (data.GetU32(&offset, &version_info, 1) == nullptr) {
+-        error.SetErrorString("failed to read NetBSD ABI note payload");
+-        return error;
+-      }
+-
++    else if (note.n_name == LLDB_NT_OWNER_NETBSD) {
+       // Set the elf OS version to NetBSD.  Also clear the vendor.
+       arch_spec.GetTriple().setOS(llvm::Triple::OSType::NetBSD);
+       arch_spec.GetTriple().setVendor(llvm::Triple::VendorType::UnknownVendor);
+-
+-      if (log)
+-        log->Printf(
+-            "ObjectFileELF::%s detected NetBSD, min version constant %" PRIu32,
+-            __FUNCTION__, version_info);
+     }
+     // Process OpenBSD ELF notes.
+     else if (note.n_name == LLDB_NT_OWNER_OPENBSD) {


Home | Main Index | Thread Index | Old Index