pkgsrc-WIP-changes archive

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

lldb-git: Apply patches from upstream review



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Mar 28 23:57:40 2017 +0200
Changeset:	5f966e5c9fb79c55da5c23a673f223a49e4e7695

Modified Files:
	lldb-git/distinfo
	lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
	lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp

Log Message:
lldb-git: Apply patches from upstream review

https://reviews.llvm.org/D31374

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=5f966e5c9fb79c55da5c23a673f223a49e4e7695

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

diffstat:
 lldb-git/distinfo                                  |  4 +--
 ..._Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 28 ++++++-------------
 ...e_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp | 31 +++++++---------------
 3 files changed, 19 insertions(+), 44 deletions(-)

diffs:
diff --git a/lldb-git/distinfo b/lldb-git/distinfo
index 953b462cb1..c44184bc22 100644
--- a/lldb-git/distinfo
+++ b/lldb-git/distinfo
@@ -13,11 +13,11 @@ 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_Process_NetBSD_CMakeLists.txt) = 4af51b7cd3d344e503436a456ba4c3021f5ea420
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 041afad9fa82b85be6a7ab216e012948c1e2fca7
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 2af19ccf92092698ad49984f889fbe8ed94d041c
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = bcad5c8debb05c44f95a1d00d124314be824ec1d
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = f649f540c3073bc8f111b28006c737e075776f8a
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = 2cdd8209e096ef2feffa93f8797b4cb996d3465e
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = 6ba98edbfffef92b87b8d93d438cae72ea11f392
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h) = 6e1385ffe58efc8a39151df1ed57d7c253edda4e
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = de62bab4ae9a96efb16b286883337553509e9c91
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = ef379380c2aa69a7b81f2e7fd99b06311d063d1c
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = 2ad544c23cd6398c54b6d06a1b252aa19af8e5d5
diff --git a/lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp b/lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
index ee0613e02f..c330be84c0 100644
--- a/lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -152,7 +152,7 @@ $NetBSD$
  }
  
  // -----------------------------------------------------------------------------
-@@ -48,4 +162,843 @@ Error NativeProcessProtocol::Attach(
+@@ -48,4 +162,831 @@ Error NativeProcessProtocol::Attach(
  // -----------------------------------------------------------------------------
  
  NativeProcessNetBSD::NativeProcessNetBSD()
@@ -441,9 +441,6 @@ $NetBSD$
 +Error NativeProcessNetBSD::Signal(int signo) {
 +  Error error;
 +
-+  Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
-+  LLDB_LOG(log, "selecting running thread for interrupt target");
-+
 +  if (kill(GetID(), signo))
 +    error.SetErrorToErrno();
 +
@@ -612,11 +609,11 @@ $NetBSD$
 +
 +Error NativeProcessNetBSD::AllocateMemory(size_t size, uint32_t permissions,
 +                                          lldb::addr_t &addr) {
-+  return Error();
++  return Error("Unimplemented");
 +}
 +
 +Error NativeProcessNetBSD::DeallocateMemory(lldb::addr_t addr) {
-+  return Error();
++  return Error("Unimplemented");
 +}
 +
 +lldb::addr_t NativeProcessNetBSD::GetSharedLibraryInfoAddress() {
@@ -658,16 +655,7 @@ $NetBSD$
 +
 +Error NativeProcessNetBSD::GetLoadedModuleFileSpec(const char *module_path,
 +                                                   FileSpec &file_spec) {
-+  FileSpec module_file_spec(module_path, true);
-+
-+  bool found = false;
-+  file_spec.Clear();
-+
-+  if (!found)
-+    return Error("Module file (%s) not found in /proc/%" PRIu64 "/maps file!",
-+                 module_file_spec.GetFilename().AsCString(), GetID());
-+
-+  return Error();
++  return Error("Unimplemented");
 +}
 +
 +Error NativeProcessNetBSD::GetFileLoadAddress(const llvm::StringRef &file_name,
@@ -793,7 +781,7 @@ $NetBSD$
 +  Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
 +  // Process all pending waitpid notifications.
 +  int status;
-+  ::pid_t wait_pid = waitpid(WAIT_ANY, &status, WALLSIG | WNOHANG);
++  ::pid_t wait_pid = waitpid(GetID(), &status, WALLSIG | WNOHANG);
 +
 +  if (wait_pid == 0)
 +    return; // We are done.
@@ -803,7 +791,7 @@ $NetBSD$
 +      return;
 +
 +    Error error(errno, eErrorTypePOSIX);
-+    LLDB_LOG(log, "waitpid (-1, &status, _) failed: {0}", error);
++    LLDB_LOG(log, "waitpid ({0}, &status, _) failed: {1}", GetID(), error);
 +  }
 +
 +  bool exited = false;
@@ -828,8 +816,8 @@ $NetBSD$
 +    status_cstr = "(\?\?\?)";
 +
 +  LLDB_LOG(log,
-+           "waitpid (-1, &status, _) => pid = {0}, status = {1:x} "
-+           "({2}), signal = {3}, exit_state = {4}",
++           "waitpid ({0}, &status, _) => pid = {1}, status = {2:x} "
++           "({3}), signal = {4}, exit_state = {5}", GetID(),
 +           wait_pid, status, status_cstr, signal, exit_status);
 +
 +  if (exited)
diff --git a/lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp b/lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
index febe5ed35f..1769bad44e 100644
--- a/lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
+++ b/lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp.orig	2017-03-21 17:54:57.000000000 +0000
 +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
-@@ -12,10 +12,145 @@
+@@ -12,10 +12,132 @@
  
  #include "NativeProcessNetBSD.h"
  
@@ -23,10 +23,8 @@ $NetBSD$
 +
 +void NativeThreadNetBSD::SetStoppedBySignal(uint32_t signo,
 +                                            const siginfo_t *info) {
-+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-+  if (log)
-+    log->Printf("NativeThreadNetBSD::%s called with signal 0x%02" PRIx32,
-+                __FUNCTION__, signo);
++  Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
++  LLDB_LOG(log, "tid = {0} in called with signal {1}", GetID(), signo);
 +
 +  SetStopped();
 +
@@ -48,9 +46,6 @@ $NetBSD$
 +}
 +
 +void NativeThreadNetBSD::SetStoppedByBreakpoint() {
-+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-+  if (log)
-+    log->Printf("NativeThreadNetBSD::%s()", __FUNCTION__);
 +  SetStopped();
 +  m_stop_info.reason = StopReason::eStopReasonBreakpoint;
 +  m_stop_info.details.signal.signo = SIGTRAP;
@@ -63,10 +58,6 @@ $NetBSD$
 +}
 +
 +void NativeThreadNetBSD::SetRunning() {
-+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-+  if (log)
-+    log->Printf("NativeThreadNetBSD::%s()", __FUNCTION__);
-+
 +  m_state = StateType::eStateRunning;
 +  m_stop_info.reason = StopReason::eStopReasonNone;
 +}
@@ -79,7 +70,7 @@ $NetBSD$
 +
 +bool NativeThreadNetBSD::GetStopReason(ThreadStopInfo &stop_info,
 +                                       std::string &description) {
-+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
++  Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
 +
 +  description.clear();
 +
@@ -101,11 +92,7 @@ $NetBSD$
 +  case eStateRunning:
 +  case eStateStepping:
 +  case eStateDetached:
-+    if (log) {
-+      log->Printf("NativeThreadNetBSD::%s tid %" PRIu64
-+                  " in state %s cannot answer stop reason",
-+                  __FUNCTION__, GetID(), StateAsCString(m_state));
-+    }
++    LLDB_LOG(log, "tid = {0} in state {1} cannot answer stop reason", GetID(), StateAsCString(m_state));
 +    return false;
 +  }
 +  llvm_unreachable("unhandled StateType!");
@@ -134,18 +121,18 @@ $NetBSD$
 +
 +Error NativeThreadNetBSD::SetWatchpoint(lldb::addr_t addr, size_t size,
 +                                        uint32_t watch_flags, bool hardware) {
-+  return Error();
++  return Error("Unimplemented");
 +}
 +
 +Error NativeThreadNetBSD::RemoveWatchpoint(lldb::addr_t addr) {
-+  return Error();
++  return Error("Unimplemented");
 +}
 +
 +Error NativeThreadNetBSD::SetHardwareBreakpoint(lldb::addr_t addr,
 +                                                size_t size) {
-+  return Error();
++  return Error("Unimplemented");
 +}
 +
 +Error NativeThreadNetBSD::RemoveHardwareBreakpoint(lldb::addr_t addr) {
-+  return Error();
++  return Error("Unimplemented");
 +}


Home | Main Index | Thread Index | Old Index