pkgsrc-WIP-changes archive

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

lldb-netbsd: Make handling NetBSD-CORE files prettier



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Apr 17 18:31:45 2017 +0200
Changeset:	0e845484f3417ddd03ac6e4d4892cfa58dec69ea

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

Log Message:
lldb-netbsd: Make handling NetBSD-CORE files prettier

Rename LLDB_NT_OWNER_NETBSD to LLDB_NT_OWNER_NETBSDCORE.
This follows NetBSD specific core(5) note name "NetBSD-CORE".

Check for LLDB_NT_NETBSD_NT_PROCINFO (1) in note type, to set
appropriate OS and Vendor to NetBSD only once.

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=0e845484f3417ddd03ac6e4d4892cfa58dec69ea

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

diffstat:
 lldb-netbsd/distinfo                                        |  2 +-
 .../patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp   | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 21953f16e1..03491bbdc9 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -12,7 +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_ObjectFile_ELF_ObjectFileELF.cpp) = cdc5861eedcc79d3484ba011f5be595b2afcbae2
 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
index 372bf22423..f4173e1739 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp
@@ -7,21 +7,21 @@ $NetBSD$
  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_NETBSDCORE = "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
+@@ -67,8 +67,7 @@ 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;
--
++const elf_word LLDB_NT_NETBSD_NT_PROCINFO = 1;
+ 
  // 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
+@@ -1371,24 +1370,11 @@ ObjectFileELF::RefineModuleDetailsFromNo
          arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux);
      }
      // Process NetBSD ELF notes.
@@ -35,7 +35,8 @@ $NetBSD$
 -        return error;
 -      }
 -
-+    else if (note.n_name == LLDB_NT_OWNER_NETBSD) {
++    else if ((note.n_name == LLDB_NT_OWNER_NETBSDCORE) &&
++             (note.n_type == LLDB_NT_NETBSD_NT_PROCINFO)) {
        // 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);


Home | Main Index | Thread Index | Old Index