Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Don't convert syscall args for trac...



details:   https://anonhg.NetBSD.org/src/rev/796744b449e6
branches:  trunk
changeset: 556002:796744b449e6
user:      petrov <petrov%NetBSD.org@localhost>
date:      Fri Dec 05 21:49:00 2003 +0000

description:
Don't convert syscall args for tracing 32bit binaries on 64bit
kernel. Found and suggested by David Light. Fixes port-sparc64/23473.

diffstat:

 sys/arch/sparc64/sparc64/trap.c |  19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diffs (40 lines):

diff -r da1c7cc2a42f -r 796744b449e6 sys/arch/sparc64/sparc64/trap.c
--- a/sys/arch/sparc64/sparc64/trap.c   Fri Dec 05 21:24:57 2003 +0000
+++ b/sys/arch/sparc64/sparc64/trap.c   Fri Dec 05 21:49:00 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.104 2003/12/03 20:23:41 petrov Exp $ */
+/*     $NetBSD: trap.c,v 1.105 2003/12/05 21:49:00 petrov Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.104 2003/12/03 20:23:41 petrov Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.105 2003/12/05 21:49:00 petrov Exp $");
 
 #define NEW_FPSTATE
 
@@ -2072,19 +2072,8 @@
                        *argp++ = *ap++;
 
 #ifdef KTRACE
-               if (KTRPOINT(p, KTR_SYSCALL)) {
-#if defined(__arch64__)
-                       register_t temp[8];
-                       
-                       /* Need to xlate 32-bit->64-bit */
-                       i = callp->sy_narg;
-                       for (j = 0; j < i; j++) 
-                               temp[j] = args.i[j];
-                       ktrsyscall(p, code, code, NULL, (register_t *)temp);
-#else
-                       ktrsyscall(p, code, code, NULL, (register_t *)&args.i);
-#endif
-               }
+               if (KTRPOINT(p, KTR_SYSCALL))
+                       ktrsyscall(p, code, code, NULL, (register_t *)&args);
 #endif /* KTRACE */
                if (error)
                        goto bad;



Home | Main Index | Thread Index | Old Index