pkgsrc-WIP-changes archive

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

lldb-git: Minor tweaks around qmemoryregion



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Mar 26 06:01:24 2017 +0200
Changeset:	d2c8612d5b25398310e612791a3b1a82de03687e

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

Log Message:
lldb-git: Minor tweaks around qmemoryregion

This code fixes retrieving memory region's protection.
Use clang-format off for NetBSD style of includes.

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=d2c8612d5b25398310e612791a3b1a82de03687e

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

diffstat:
 lldb-git/distinfo                                         |  2 +-
 ...-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 15 +++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)

diffs:
diff --git a/lldb-git/distinfo b/lldb-git/distinfo
index dd4b601dc8..f776179861 100644
--- a/lldb-git/distinfo
+++ b/lldb-git/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_Process_NetBSD_CMakeLists.txt) = 4af51b7cd3d344e503436a456ba4c3021f5ea420
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = c0233356bd8b290e7f0cf3d18103ab57fb265615
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 015b6356a543fad63def9d14a38668480982f532
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = bcad5c8debb05c44f95a1d00d124314be824ec1d
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = 85263360ba595a703b089a76af3b5ca54b689edc
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = 7ef78e3cc7e45ba79a66b5555d526efeefe29090
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 9de7318d26..485c46716c 100644
--- a/lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-git/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig	2017-03-21 17:54:57.000000000 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
-@@ -14,18 +14,75 @@
+@@ -14,18 +14,77 @@
  // C++ Includes
  
  // Other libraries and framework includes
@@ -18,6 +18,7 @@ $NetBSD$
  // System includes - They have to be included after framework includes because
  // they define some
  // macros which collide with variable names in other modules
++// clang-format off
 +#include <sys/types.h>
 +#include <sys/ptrace.h>
 +#include <sys/sysctl.h>
@@ -25,6 +26,7 @@ $NetBSD$
 +#include <uvm/uvm_prot.h>
 +#include <elf.h>
 +#include <util.h>
++// clang-format on
  
  using namespace lldb;
  using namespace lldb_private;
@@ -79,7 +81,7 @@ $NetBSD$
  // -----------------------------------------------------------------------------
  // Public Static Methods
  // -----------------------------------------------------------------------------
-@@ -34,13 +91,68 @@ Error NativeProcessProtocol::Launch(
+@@ -34,13 +93,68 @@ Error NativeProcessProtocol::Launch(
      ProcessLaunchInfo &launch_info,
      NativeProcessProtocol::NativeDelegate &native_delegate, MainLoop &mainloop,
      NativeProcessProtocolSP &native_process_sp) {
@@ -150,12 +152,13 @@ $NetBSD$
  }
  
  // -----------------------------------------------------------------------------
-@@ -48,4 +160,842 @@ Error NativeProcessProtocol::Attach(
+@@ -48,4 +162,843 @@ Error NativeProcessProtocol::Attach(
  // -----------------------------------------------------------------------------
  
  NativeProcessNetBSD::NativeProcessNetBSD()
 -    : NativeProcessProtocol(LLDB_INVALID_PROCESS_ID) {}
-+    : NativeProcessProtocol(LLDB_INVALID_PROCESS_ID), m_arch() {}
++    : NativeProcessProtocol(LLDB_INVALID_PROCESS_ID), m_arch(),
++      m_supports_mem_region(eLazyBoolCalculate), m_mem_region_cache() {}
 +
 +// Handles all waitpid events from the inferior process.
 +void NativeProcessNetBSD::MonitorCallback(lldb::pid_t pid, int signal) {
@@ -503,9 +506,9 @@ $NetBSD$
 +  for (auto it = m_mem_region_cache.begin(); it != m_mem_region_cache.end();
 +       ++it) {
 +    MemoryRegionInfo &proc_entry_info = it->first;
-+    // Sanity check assumption that /proc/{pid}/maps entries are ascending.
++    // Sanity check assumption that memory map entries are ascending.
 +    assert((proc_entry_info.GetRange().GetRangeBase() >= prev_base_address) &&
-+           "descending /proc/pid/maps entries detected, unexpected");
++           "descending memory map entries detected, unexpected");
 +    prev_base_address = proc_entry_info.GetRange().GetRangeBase();
 +    UNUSED_IF_ASSERT_DISABLED(prev_base_address);
 +    // If the target address comes before this entry, indicate distance to next


Home | Main Index | Thread Index | Old Index