From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 20:46:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C91E106570C; Sat, 6 Feb 2010 20:46:15 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDFDA8FC0C; Sat, 6 Feb 2010 20:46:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16KkE8u034724; Sat, 6 Feb 2010 20:46:14 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16KkEsJ034722; Sat, 6 Feb 2010 20:46:14 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002062046.o16KkEsJ034722@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 6 Feb 2010 20:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203572 - head/sys/ia64/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 20:46:15 -0000 Author: marcel Date: Sat Feb 6 20:46:14 2010 New Revision: 203572 URL: http://svn.freebsd.org/changeset/base/203572 Log: Fix single-stepping when the kernel was entered through the EPC syscall path. When the taken branch leaves the kernel and enters the process, we still need to execute the instruction at that address. Don't raise SIGTRAP when we branch into the process, but enable single-stepping instead. Modified: head/sys/ia64/ia64/trap.c Modified: head/sys/ia64/ia64/trap.c ============================================================================== --- head/sys/ia64/ia64/trap.c Sat Feb 6 20:41:25 2010 (r203571) +++ head/sys/ia64/ia64/trap.c Sat Feb 6 20:46:14 2010 (r203572) @@ -803,7 +803,7 @@ trap(int vector, struct trapframe *tf) * out of the gateway page we'll get back into the kernel * and then we enable single stepping. * Since this a rather round-about way of enabling single - * stepping, don't make things complicated even more by + * stepping, don't make things even more complicated by * calling userret() and do_ast(). We do that later... */ tf->tf_special.psr &= ~IA64_PSR_LP; @@ -814,13 +814,14 @@ trap(int vector, struct trapframe *tf) /* * Don't assume there aren't any branches other than the * branch that takes us out of the gateway page. Check the - * iip and raise SIGTRAP only when it's an user address. + * iip and enable single stepping only when it's an user + * address. */ if (tf->tf_special.iip >= VM_MAX_ADDRESS) return; tf->tf_special.psr &= ~IA64_PSR_TB; - sig = SIGTRAP; - break; + tf->tf_special.psr |= IA64_PSR_SS; + return; case IA64_VEC_IA32_EXCEPTION: case IA64_VEC_IA32_INTERCEPT: