Module Name:    src
Committed By:   reinoud
Date:           Wed Aug 24 20:03:19 UTC 2011

Modified Files:
        src/sys/arch/usermode/usermode: copy.c

Log Message:
Add debug statements in copyin/copyout


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/usermode/usermode/copy.c

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

Modified files:

Index: src/sys/arch/usermode/usermode/copy.c
diff -u src/sys/arch/usermode/usermode/copy.c:1.2 src/sys/arch/usermode/usermode/copy.c:1.3
--- src/sys/arch/usermode/usermode/copy.c:1.2	Wed Oct 21 16:07:00 2009
+++ src/sys/arch/usermode/usermode/copy.c	Wed Aug 24 20:03:19 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: copy.c,v 1.2 2009/10/21 16:07:00 snj Exp $ */
+/* $NetBSD: copy.c,v 1.3 2011/08/24 20:03:19 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
@@ -27,14 +27,18 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copy.c,v 1.2 2009/10/21 16:07:00 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copy.c,v 1.3 2011/08/24 20:03:19 reinoud Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
+#include <sys/param.h>		// tmp
+#include <uvm/uvm.h>		// tmp
+#include <uvm/uvm_pmap.h>	// tmp
 
 int
 copyin(const void *uaddr, void *kaddr, size_t len)
 {
+printf("copyin uaddr %p, kaddr %p, len %d\n", uaddr, kaddr, (int) len);
 	memcpy(kaddr, uaddr, len);
 	return 0;
 }
@@ -42,6 +46,9 @@
 int
 copyout(const void *kaddr, void *uaddr, size_t len)
 {
+printf("copyout kaddr %p, uaddr %p, len %d\n", kaddr, uaddr, (int) len);
+printf("curlwp pmap = %p\n", curlwp->l_proc->p_vmspace->vm_map.pmap);
+
 	memcpy(uaddr, kaddr, len);
 	return 0;
 }

Reply via email to