From owner-cvs-src-old@FreeBSD.ORG Sat Jan 23 22:11:29 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5F101065694 for ; Sat, 23 Jan 2010 22:11:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 93D328FC08 for ; Sat, 23 Jan 2010 22:11:29 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NMBTbM030057 for ; Sat, 23 Jan 2010 22:11:29 GMT (envelope-from marius@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0NMBTEt030056 for cvs-src-old@freebsd.org; Sat, 23 Jan 2010 22:11:29 GMT (envelope-from marius@repoman.freebsd.org) Message-Id: <201001232211.o0NMBTEt030056@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to marius@repoman.freebsd.org using -f From: Marius Strobl Date: Sat, 23 Jan 2010 22:11:18 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/sparc64/sparc64 trap.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 22:11:29 -0000 marius 2010-01-23 22:11:18 UTC FreeBSD src repository Modified files: sys/sparc64/sparc64 trap.c Log: SVN rev 202900 on 2010-01-23 22:11:18Z by marius Merge r202882 from amd64/i386: For PT_TO_SCE stop that stops the ptraced process upon syscall entry, syscall arguments are collected before ptracestop() is called. As a consequence, debugger cannot modify syscall or its arguments. In syscall(), reread syscall number and arguments after ptracestop(), if debugger modified anything in the process environment. Since procfs stopevent requires number of syscall arguments in p_xstat, this cannot be solved by moving stop/trace point before argument fetching. Move the code to read arguments into separate function fetch_syscall_args() to avoid code duplication. Note that ktrace point for modified syscall is intentionally recorded twice, once with original arguments, and second time with the arguments set by debugger. PT_TO_SCX stop is executed after cpu_syscall_set_retval() already. Reviewed by: kib Revision Changes Path 1.100 +104 -69 src/sys/sparc64/sparc64/trap.c