pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lldb-netbsd: Update to 303635
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Wed May 24 04:24:17 2017 +0200
Changeset: ef2e711881f9d5ded4776d91f0398e53d1c24e52
Modified Files:
lldb-netbsd/Makefile
lldb-netbsd/TODO
lldb-netbsd/distinfo
lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp
Log Message:
lldb-netbsd: Update to 303635
Add current milestones in the project in LLDB:
1. Fix the kernel for multiple threads in tracee
2. Add support for multiple threads in NetBSD Native Process Plugin
3. Enable tests on the NetBSD buildbot
Partially revamp patches for new code. There is one patch left to be
rediffed.
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=ef2e711881f9d5ded4776d91f0398e53d1c24e52
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/TODO | 6 +++
lldb-netbsd/distinfo | 6 +--
...ce_Plugins_Process_NetBSD_NativeProcessNetBSD.h | 12 +++---
...rce_Plugins_Process_elf-core_ProcessElfCore.cpp | 48 +++++++++++-----------
5 files changed, 40 insertions(+), 34 deletions(-)
diffs:
diff --git a/lldb-netbsd/Makefile b/lldb-netbsd/Makefile
index a6630cf6b0..f924a9df63 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= 302388
+SVN_REVISION.lldb= 303635
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://lldb.org/
diff --git a/lldb-netbsd/TODO b/lldb-netbsd/TODO
index bb571d071b..32b39d928f 100644
--- a/lldb-netbsd/TODO
+++ b/lldb-netbsd/TODO
@@ -32,3 +32,9 @@ Known bugs
- fix test suite bugs..
- unknown ones
- switch from kvm(3) to sysctl(7)
+
+REMAINING MILESTONES
+====================
+1. Fix the kernel for multiple threads in tracee
+2. Add support for multiple threads in NetBSD Native Process Plugin
+3. Enable tests on the NetBSD buildbot
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 76a1acaa15..4e12b29587 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -13,7 +13,7 @@ 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) = 76d47d654951d36dc493611dfa636c1dcff0c3af
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 366114a3b5edf766668ae2d309bf77757329ae50
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = 0dbad0c386c14eec866f469deb9b49e689391891
-SHA1 (patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp) = 16d6404b9565bee3a8dd67e9743eeb36bf20d613
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 3daf2df890e4a4098eadc18261ac9b2a0840acd4
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = da6c430a4932f0c3feee389082fad4ef34360b9e
+SHA1 (patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp) = cdfb65a14116c3bd3d3ad977328e2b0c4ae4f9aa
SHA1 (patch-source_Plugins_Process_elf-core_ProcessElfCore.h) = 902ce5e0187aa2649986db08c79af7291b852727
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
index 7d25179517..88a7687786 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h
@@ -6,17 +6,17 @@ $NetBSD$
// ---------------------------------------------------------------------
NativeProcessNetBSD();
-+ Error GetThreadIndexByTid(lldb::tid_t thread_id, size_t &index);
-+ Error RemoveThread(lldb::tid_t thread_id);
++ Status GetThreadIndexByTid(lldb::tid_t thread_id, size_t &index);
++ Status RemoveThread(lldb::tid_t thread_id);
NativeThreadNetBSDSP AddThread(lldb::tid_t thread_id);
- Error LaunchInferior(MainLoop &mainloop, ProcessLaunchInfo &launch_info);
+ Status LaunchInferior(MainLoop &mainloop, ProcessLaunchInfo &launch_info);
@@ -133,6 +135,8 @@ private:
- ::pid_t Attach(lldb::pid_t pid, Error &error);
+ ::pid_t Attach(lldb::pid_t pid, Status &error);
- Error ReinitializeThreads();
+ Status ReinitializeThreads();
+
-+ Error SetDefaultPtraceOpts();
++ Status SetDefaultPtraceOpts();
};
} // namespace process_netbsd
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 b6ada6ca3c..aedb04f6f0 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
@@ -18,7 +18,7 @@ $NetBSD$
#include "llvm/Support/ELF.h"
#include "llvm/Support/Threading.h"
-@@ -219,7 +221,7 @@ Error ProcessElfCore::DoLoadCore() {
+@@ -219,7 +221,7 @@ Status ProcessElfCore::DoLoadCore() {
ArchSpec core_arch(m_core_module_sp->GetArchitecture());
target_arch.MergeFrom(core_arch);
GetTarget().SetArchitecture(target_arch);
@@ -58,7 +58,7 @@ $NetBSD$
}
-static void ParseNetBSDProcInfo(ThreadData &thread_data, DataExtractor &data) {
-+static Error ParseNetBSDProcInfo(DataExtractor &data, uint32_t &cpi_nlwps,
++static Status ParseNetBSDProcInfo(DataExtractor &data, uint32_t &cpi_nlwps,
+ uint32_t &cpi_signo, uint32_t &cpi_siglwp) {
lldb::offset_t offset = 0;
@@ -66,15 +66,15 @@ $NetBSD$
+ uint32_t version = data.GetU32(&offset);
if (version != 1)
- return;
-+ return Error(
-+ "Error parsing NetBSD core(5) notes: Unsupported procinfo version");
++ return Status(
++ "Status parsing NetBSD core(5) notes: Unsupported procinfo version");
- offset += 4;
- thread_data.signo = data.GetU32(&offset);
+ uint32_t cpisize = data.GetU32(&offset);
+ if (cpisize != NETBSD::NT_PROCINFO_SIZE)
-+ return Error(
-+ "Error parsing NetBSD core(5) notes: Unsupported procinfo size");
++ return Status(
++ "Status parsing NetBSD core(5) notes: Unsupported procinfo size");
+
+ cpi_signo = data.GetU32(&offset); /* killing signal */
+
@@ -84,7 +84,7 @@ $NetBSD$
+ offset += 32;
+ cpi_siglwp = data.GetU32(&offset); /* LWP target of killing signal */
+
-+ return Error();
++ return Status();
}
static void ParseOpenBSDProcInfo(ThreadData &thread_data, DataExtractor &data) {
@@ -93,7 +93,7 @@ $NetBSD$
/// 2) NOTE Entry contains a standard header followed by variable size data.
/// (see ELFNote structure)
-/// 3) A Thread Context in a core file usually described by 3 NOTE entries.
-+Error ProcessElfCore::ParseThreadContextsFromNoteSegment(
++Status ProcessElfCore::ParseThreadContextsFromNoteSegment(
+ const elf::ELFProgramHeader *segment_header, DataExtractor segment_data) {
+
+ assert(segment_header && segment_header->p_type == llvm::ELF::PT_NOTE);
@@ -124,14 +124,14 @@ $NetBSD$
/// new thread when it finds NT_PRSTATUS or NT_PRPSINFO NOTE entry.
/// For case (b) there may be either one NT_PRPSINFO per thread, or a single
/// one that applies to all threads (depending on the platform type).
--Error ProcessElfCore::ParseThreadContextsFromNoteSegment(
-+Error ProcessElfCore::ParseThreadContextsFromNoteSegmentGeneric(
+-Status ProcessElfCore::ParseThreadContextsFromNoteSegment(
++Status ProcessElfCore::ParseThreadContextsFromNoteSegmentGeneric(
const elf::ELFProgramHeader *segment_header, DataExtractor segment_data) {
+
assert(segment_header && segment_header->p_type == llvm::ELF::PT_NOTE);
lldb::offset_t offset = 0;
-@@ -607,21 +646,6 @@ Error ProcessElfCore::ParseThreadContext
+@@ -607,21 +646,6 @@ Status ProcessElfCore::ParseThreadContext
default:
break;
}
@@ -153,7 +153,7 @@ $NetBSD$
} else if (note.n_name.substr(0, 7) == "OpenBSD") {
// OpenBSD per-thread information is stored in notes named
// "OpenBSD@nnn" so match on the initial part of the string.
-@@ -659,7 +683,7 @@ Error ProcessElfCore::ParseThreadContext
+@@ -659,7 +683,7 @@ Status ProcessElfCore::ParseThreadContext
// The result from FXSAVE is in NT_PRXFPREG for i386 core files
if (arch.GetCore() == ArchSpec::eCore_x86_64_x86_64)
thread_data->fpregset = note_data;
@@ -162,7 +162,7 @@ $NetBSD$
thread_data->fpregset = note_data;
break;
case NT_PRPSINFO:
-@@ -717,6 +741,136 @@ Error ProcessElfCore::ParseThreadContext
+@@ -717,6 +741,136 @@ Status ProcessElfCore::ParseThreadContext
return error;
}
@@ -188,7 +188,7 @@ $NetBSD$
+///
+/// For more information see /usr/include/sys/exec_elf.h
+///
-+Error ProcessElfCore::ParseThreadContextsFromNoteSegmentNetBSD(
++Status ProcessElfCore::ParseThreadContextsFromNoteSegmentNetBSD(
+ const elf::ELFProgramHeader *segment_header, DataExtractor segment_data) {
+
+ assert(segment_header && segment_header->p_type == llvm::ELF::PT_NOTE);
@@ -222,7 +222,7 @@ $NetBSD$
+
+ if (name == "NetBSD-CORE") {
+ if (note.n_type == NETBSD::NT_PROCINFO) {
-+ Error error = ParseNetBSDProcInfo(note_data, nlwps, signo, siglwp);
++ Status error = ParseNetBSDProcInfo(note_data, nlwps, signo, siglwp);
+ if (error.Fail())
+ return error;
+ } else if (note.n_type == NETBSD::NT_AUXV) {
@@ -231,7 +231,7 @@ $NetBSD$
+ } else if (name.consume_front("NetBSD-CORE@")) {
+ lldb::tid_t tid;
+ if (name.getAsInteger(10, tid))
-+ return Error("Error parsing NetBSD core(5) notes: Cannot convert "
++ return Status("Status parsing NetBSD core(5) notes: Cannot convert "
+ "LWP ID to integer");
+
+ switch (arch.GetMachine()) {
@@ -243,31 +243,31 @@ $NetBSD$
+ m_thread_data.back().tid = tid;
+ } else if (note.n_type == NETBSD::AMD64::NT_FPREGS) {
+ if (m_thread_data.empty() || tid != m_thread_data.back().tid)
-+ return Error("Error parsing NetBSD core(5) notes: Unexpected order "
++ return Status("Error parsing NetBSD core(5) notes: Unexpected order "
+ "of NOTEs PT_GETFPREG before PT_GETREG");
+ m_thread_data.back().fpregset = note_data;
+ } else {
-+ return Error(
++ return Status(
+ "Error parsing NetBSD core(5) notes: Unsupported AMD64 NOTE");
+ }
+ } break;
+ default:
-+ return Error(
++ return Status(
+ "Error parsing NetBSD core(5) notes: Unsupported architecture");
+ }
+ } else {
-+ return Error("Error parsing NetBSD core(5) notes: Unrecognized note");
++ return Status("Error parsing NetBSD core(5) notes: Unrecognized note");
+ }
+
+ offset += note_size;
+ }
+
+ if (m_thread_data.empty())
-+ return Error("Error parsing NetBSD core(5) notes: No threads information "
++ return Status("Error parsing NetBSD core(5) notes: No threads information "
+ "specified in notes");
+
+ if (m_thread_data.size() != nlwps)
-+ return Error("rror parsing NetBSD core(5) notes: Mismatch between the "
++ return Status("rror parsing NetBSD core(5) notes: Mismatch between the "
+ "number of LWPs in netbsd_elfcore_procinfo and the number of "
+ "LWPs specified by MD notes");
+
@@ -289,11 +289,11 @@ $NetBSD$
+ }
+
+ if (!passed)
-+ return Error(
++ return Status(
+ "Error parsing NetBSD core(5) notes: Signal passed to unknown LWP");
+ }
+
-+ return Error();
++ return Status();
+}
+
uint32_t ProcessElfCore::GetNumThreadContexts() {
Home |
Main Index |
Thread Index |
Old Index