pkgsrc-WIP-changes archive

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

edb-debugger: Remove openbsd specific code from netbsd/



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Thu Jan 7 05:19:08 2016 +0100
Changeset:	5939535038deccf1cdb225488182a3cdefa3a7c5

Modified Files:
	edb-debugger/distinfo
	edb-debugger/patches/patch-plugins_DebuggerCore_unix_netbsd_DebuggerCore.cpp

Log Message:
edb-debugger: Remove openbsd specific code from netbsd/

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5939535038deccf1cdb225488182a3cdefa3a7c5

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

diffstat:
 edb-debugger/distinfo                              |  2 +-
 ...ugins_DebuggerCore_unix_netbsd_DebuggerCore.cpp | 94 +---------------------
 2 files changed, 3 insertions(+), 93 deletions(-)

diffs:
diff --git a/edb-debugger/distinfo b/edb-debugger/distinfo
index 5a81415..b3759f8 100644
--- a/edb-debugger/distinfo
+++ b/edb-debugger/distinfo
@@ -7,7 +7,7 @@ Size (debugger-0.9.20.tgz) = 791820 bytes
 SHA1 (patch-plugins_BinaryInfo_ELF32.cpp) = bf9ea68d80be00f4ccfdbeecdb774916a8491954
 SHA1 (patch-plugins_BinaryInfo_ELF64.cpp) = 255a25419ec7eaaa3231eb168c7dac2c92430fbe
 SHA1 (patch-plugins_DebuggerCore_DebuggerCore.pro) = 2afec83ad714818d6535327f6f0b64a448d3b77c
-SHA1 (patch-plugins_DebuggerCore_unix_netbsd_DebuggerCore.cpp) = 8142fc93bf5afdffa3c5d469bb7d805e2133cd4b
+SHA1 (patch-plugins_DebuggerCore_unix_netbsd_DebuggerCore.cpp) = a77e980a124dac49a8aad44ff397913a56ad6cb7
 SHA1 (patch-plugins_DebuggerCore_unix_netbsd_DebuggerCore.h) = 1e841035c6238d2f36e588306b44991b0cebcefa
 SHA1 (patch-plugins_DebuggerCore_unix_netbsd_PlatformEvent.cpp) = e4d386f0f7f2bacdb419d6811ca853913b14a6ac
 SHA1 (patch-plugins_DebuggerCore_unix_netbsd_PlatformEvent.h) = 047ea37f192c5da8a96e4f1ee7d0c21fe72a6d6e
diff --git a/edb-debugger/patches/patch-plugins_DebuggerCore_unix_netbsd_DebuggerCore.cpp b/edb-debugger/patches/patch-plugins_DebuggerCore_unix_netbsd_DebuggerCore.cpp
index 208f447..23a1217 100644
--- a/edb-debugger/patches/patch-plugins_DebuggerCore_unix_netbsd_DebuggerCore.cpp
+++ b/edb-debugger/patches/patch-plugins_DebuggerCore_unix_netbsd_DebuggerCore.cpp
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- plugins/DebuggerCore/unix/netbsd/DebuggerCore.cpp.orig	2016-01-07 03:04:04.000000000 +0000
+--- plugins/DebuggerCore/unix/netbsd/DebuggerCore.cpp.orig	2016-01-07 04:12:58.000000000 +0000
 +++ plugins/DebuggerCore/unix/netbsd/DebuggerCore.cpp
-@@ -0,0 +1,736 @@
+@@ -0,0 +1,646 @@
 +/*
 +Copyright (C) 2006 - 2014 Evan Teran
 +                          eteran%alum.rit.edu@localhost
@@ -65,99 +65,9 @@ $NetBSD$
 +	}
 +	return 0;
 +}
-+
-+#if defined(OpenBSD) && (OpenBSD > 201205)
-+//------------------------------------------------------------------------------
-+// Name: load_vmmap_entries
-+// Desc: Download vmmap_entries from the kernel into our address space.
-+//       We fix up the addr tree while downloading.
-+//       Returns the size of the tree on success, or -1 on failure.
-+//       On failure, *rptr needs to be passed to unload_vmmap_entries to free
-+//       the lot.
-+//------------------------------------------------------------------------------
-+ssize_t load_vmmap_entries(kvm_t *kd, u_long kptr, struct vm_map_entry **rptr, struct vm_map_entry *parent) {
-+	struct vm_map_entry *entry;
-+	u_long left_kptr;
-+	u_long right_kptr;
-+	ssize_t left_sz;
-+	ssize_t right_sz;
-+
-+	if (kptr == 0)
-+		return 0;
-+
-+	/* Need space. */
-+	entry = (struct vm_map_entry *)malloc(sizeof(*entry));
-+	if (entry == NULL)
-+		return -1;
-+
-+	/* Download entry at kptr. */
-+	if (!kvm_read(kd, kptr, (char *)entry, sizeof(*entry))) {
-+		free(entry);
-+		return -1;
-+	}
-+
-+	/*
-+	 * Update addr pointers to have sane values in this address space.
-+	 * We save the kernel pointers in {left,right}_kptr, so we have them
-+	 * available to download children.
-+	 */
-+	left_kptr = (u_long) RB_LEFT(entry, daddrs.addr_entry);
-+	right_kptr = (u_long) RB_RIGHT(entry, daddrs.addr_entry);
-+	RB_LEFT(entry, daddrs.addr_entry) = RB_RIGHT(entry, daddrs.addr_entry) = NULL;
-+	/* Fill in parent pointer. */
-+	RB_PARENT(entry, daddrs.addr_entry) = parent;
-+
-+	/*
-+	 * Consistent state reached, fill in *rptr.
-+	 */
-+	*rptr = entry;
-+
-+	/*
-+	 * Download left, right.
-+	 * On failure, our map is in a state that can be handled by
-+	 * unload_vmmap_entries.
-+	 */
-+	left_sz = load_vmmap_entries(kd, left_kptr, &RB_LEFT(entry, daddrs.addr_entry), entry);
-+	if (left_sz == -1)
-+		return -1;
-+	right_sz = load_vmmap_entries(kd, right_kptr, &RB_RIGHT(entry, daddrs.addr_entry), entry);
-+	if (right_sz == -1)
-+		return -1;
-+
-+	return 1 + left_sz + right_sz;
-+}
-+
-+//------------------------------------------------------------------------------
-+// Name: 
-+// Desc: Free the vmmap entries in the given tree.
-+//------------------------------------------------------------------------------
-+void unload_vmmap_entries(struct vm_map_entry *entry) {
-+	if (entry == NULL)
-+		return;
-+
-+	unload_vmmap_entries(RB_LEFT(entry, daddrs.addr_entry));
-+	unload_vmmap_entries(RB_RIGHT(entry, daddrs.addr_entry));
-+	free(entry);
 +}
 +
 +//------------------------------------------------------------------------------
-+// Name: 
-+// Desc: Don't implement address comparison.
-+//------------------------------------------------------------------------------
-+int no_impl(void *p, void *q) {
-+	Q_UNUSED(p);
-+	Q_UNUSED(q);
-+	Q_ASSERT(0); /* Should not be called. */
-+	return 0;
-+}
-+#endif
-+}
-+
-+#if defined(OpenBSD) && (OpenBSD > 201205)
-+RB_GENERATE(uvm_map_addr, vm_map_entry, daddrs.addr_entry, no_impl)
-+#endif
-+
-+//------------------------------------------------------------------------------
 +// Name: DebuggerCore
 +// Desc: constructor
 +//------------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index