pkgsrc-WIP-changes archive

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

lldb-netbsd: Rebase local patches



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri May 4 18:35:12 2018 +0200
Changeset:	3ff487996c7a5628f6c58cc01100b5ca53acbd62

Modified Files:
	lldb-netbsd/Makefile
	lldb-netbsd/distinfo
	lldb-netbsd/patches/patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp
	lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp

Log Message:
lldb-netbsd: Rebase local patches

An attempt to rebase local patches to new lldb.

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=3ff487996c7a5628f6c58cc01100b5ca53acbd62

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

diffstat:
 lldb-netbsd/Makefile                               |  2 +-
 lldb-netbsd/distinfo                               |  6 +--
 ...source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp |  4 +-
 ...rce_Plugins_Process_elf-core_ProcessElfCore.cpp | 52 +++++++++++-----------
 ...urce_Plugins_Process_elf-core_ThreadElfCore.cpp |  2 +-
 5 files changed, 32 insertions(+), 34 deletions(-)

diffs:
diff --git a/lldb-netbsd/Makefile b/lldb-netbsd/Makefile
index d4a4718d23..53f19cf94d 100644
--- a/lldb-netbsd/Makefile
+++ b/lldb-netbsd/Makefile
@@ -5,7 +5,7 @@ CATEGORIES=	lang devel
 
 SVN_REPOSITORIES=	lldb
 SVN_REPO.lldb=		http://llvm.org/svn/llvm-project/lldb/trunk
-SVN_REVISION.lldb=	325964
+SVN_REVISION.lldb=	331532
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	http://lldb.org/
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 08a2474c37..012fb36d96 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -12,8 +12,8 @@ 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) = 6da890620fb393f202d2acc6402b96dbb0b82928
-SHA1 (patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp) = 048ad92f569745ab363c8d19a8081812abc94ae6
+SHA1 (patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp) = 2bddd0bc91fcf7b9c488cde327bd1006dade86ce
+SHA1 (patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp) = c9cdda1ac7346d5fb6ff9f0eaa8890b28278498c
 SHA1 (patch-source_Plugins_Process_elf-core_RegisterContextPOSIXCore__arm64.cpp) = e5d14323468130da799f4f44852ccddf6cbc62ee
 SHA1 (patch-source_Plugins_Process_elf-core_RegisterUtilities.h) = e1f3d5eb7b050e92f6d1d57ea31266eb3a8720ad
-SHA1 (patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp) = 9ef247cde8681d060263ccd25d7128f7c7d38e30
+SHA1 (patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp) = 6db7ec19df61f0f94f2da35ed5dead9f48b3098c
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 8b74011ba3..5b7319334b 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp.orig	2018-02-23 22:54:35.000000000 +0000
+--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp.orig	2018-05-04 16:30:02.190747122 +0000
 +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
 @@ -53,6 +53,7 @@ namespace {
  const char *const LLDB_NT_OWNER_FREEBSD = "FreeBSD";
@@ -23,7 +23,7 @@ $NetBSD$
  
  // GNU ABI note OS constants
  const elf_word LLDB_NT_GNU_ABI_OS_LINUX = 0x00;
-@@ -1297,25 +1300,41 @@ ObjectFileELF::RefineModuleDetailsFromNo
+@@ -1294,25 +1297,41 @@ ObjectFileELF::RefineModuleDetailsFromNo
          // The note.n_name == LLDB_NT_OWNER_GNU is valid for Linux platform
          arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux);
      }
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp
index c11a67fa6f..39a66e29a1 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- source/Plugins/Process/elf-core/ProcessElfCore.cpp.orig	2018-02-19 18:10:15.000000000 +0000
+--- source/Plugins/Process/elf-core/ProcessElfCore.cpp.orig	2018-05-04 16:30:00.745959198 +0000
 +++ source/Plugins/Process/elf-core/ProcessElfCore.cpp
 @@ -453,16 +453,43 @@ static void ParseFreeBSDPrStatus(ThreadD
    thread_data.gpregset = DataExtractor(data, offset, len);
@@ -52,15 +52,23 @@ $NetBSD$
  }
  
  static void ParseOpenBSDProcInfo(ThreadData &thread_data,
-@@ -550,35 +577,103 @@ llvm::Error ProcessElfCore::parseFreeBSD
+@@ -550,35 +577,99 @@ llvm::Error ProcessElfCore::parseFreeBSD
  
  llvm::Error ProcessElfCore::parseNetBSDNotes(llvm::ArrayRef<CoreNote> notes) {
    ThreadData thread_data;
 -  for (const auto &note : notes) {
--    // NetBSD per-thread information is stored in notes named
--    // "NetBSD-CORE@nnn" so match on the initial part of the string.
+-    // NetBSD per-thread information is stored in notes named "NetBSD-CORE@nnn"
+-    // so match on the initial part of the string.
 -    if (!llvm::StringRef(note.info.n_name).startswith("NetBSD-CORE"))
 -      continue;
++  ArchSpec arch = GetArchitecture();
++  /*
++   * To be extracted from struct netbsd_elfcore_procinfo
++   * Used to sanity check of the LWPs of the process
++   */
++  uint32_t nlwps = 0;
++  uint32_t signo;  /* killing signal */
++  uint32_t siglwp; /* LWP target of killing signal */
  
 -    switch (note.info.n_type) {
 -    case NETBSD::NT_PROCINFO:
@@ -69,7 +77,8 @@ $NetBSD$
 -    case NETBSD::NT_AUXV:
 -      m_auxv = note.data;
 -      break;
-+  ArchSpec arch = GetArchitecture();
++  for (const auto &note : notes) {
++    llvm::StringRef name = note.info.n_name;
  
 -    case NETBSD::NT_AMD64_REGS:
 -      if (GetArchitecture().GetMachine() == llvm::Triple::x86_64)
@@ -78,17 +87,6 @@ $NetBSD$
 -    default:
 -      thread_data.notes.push_back(note);
 -      break;
-+  /*
-+   * To be extracted from struct netbsd_elfcore_procinfo
-+   * Used to sanity check of the LWPs of the process
-+   */
-+  uint32_t nlwps = 0;
-+  uint32_t signo;  /* killing signal */
-+  uint32_t siglwp; /* LWP target of killing signal */
-+
-+  for (const auto &note : notes) {
-+    llvm::StringRef name = note.info.n_name;
-+
 +    if (name == "NetBSD-CORE") {
 +      if (note.info.n_type == NETBSD::NT_PROCINFO) {
 +        Status error = ParseNetBSDProcInfo(note.data, nlwps, signo, siglwp);
@@ -120,7 +118,6 @@ $NetBSD$
 +      } break;
 +      case llvm::Triple::aarch64: {
 +        /* Assume order PT_GETREGS, PT_GETFPREGS */
-+	{FILE *fp = fopen("/tmp/log.txt", "a");fprintf(fp, "%s() %s:%d note.info.n_type=%d\n", __func__, __FILE__, __LINE__, note.info.n_type);fflush(fp);fclose(fp);}
 +        if (note.info.n_type == NETBSD::AARCH64::NT_REGS) {
 +          m_thread_data.push_back(ThreadData());
 +          m_thread_data.back().gpregset = note.data;
@@ -138,12 +135,8 @@ $NetBSD$
 +      }
 +    } else {
 +      return Status("Error parsing NetBSD core(5) notes: Unrecognized note").ToError();
-     }
-   }
--  if (thread_data.gpregset.GetByteSize() == 0) {
--    return llvm::make_error<llvm::StringError>(
--        "Could not find general purpose registers note in core file.",
--        llvm::inconvertibleErrorCode());
++     }
++   }
 +
 +  if (m_thread_data.empty())
 +    return Status("Error parsing NetBSD core(5) notes: No threads information "
@@ -169,14 +162,19 @@ $NetBSD$
 +        passed = true;
 +        break;
 +      }
-+    }
+     }
+-  }
+-  if (thread_data.gpregset.GetByteSize() == 0) {
+-    return llvm::make_error<llvm::StringError>(
+-        "Could not find general purpose registers note in core file.",
+-        llvm::inconvertibleErrorCode());
+-  }
+-  m_thread_data.push_back(thread_data);
 +
 +    if (!passed)
 +      return Status(
 +          "Error parsing NetBSD core(5) notes: Signal passed to unknown LWP").ToError();
-   }
--  m_thread_data.push_back(thread_data);
-+
++   }
    return llvm::Error::success();
  }
  
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp
index bb6108e043..636383a735 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- source/Plugins/Process/elf-core/ThreadElfCore.cpp.orig	2018-02-02 18:39:12.000000000 +0000
+--- source/Plugins/Process/elf-core/ThreadElfCore.cpp.orig	2018-05-04 16:30:00.737965891 +0000
 +++ source/Plugins/Process/elf-core/ThreadElfCore.cpp
 @@ -118,6 +118,9 @@ ThreadElfCore::CreateRegisterContextForF
  


Home | Main Index | Thread Index | Old Index