From owner-svn-src-all@FreeBSD.ORG Tue May 25 21:32:38 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 41A4C1065676; Tue, 25 May 2010 21:32:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 311E18FC2C; Tue, 25 May 2010 21:32:38 +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 o4PLWcdM043576; Tue, 25 May 2010 21:32:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4PLWcB3043574; Tue, 25 May 2010 21:32:38 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201005252132.o4PLWcB3043574@svn.freebsd.org> From: John Baldwin Date: Tue, 25 May 2010 21:32:38 +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: r208555 - head/sys/kern 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: Tue, 25 May 2010 21:32:38 -0000 Author: jhb Date: Tue May 25 21:32:37 2010 New Revision: 208555 URL: http://svn.freebsd.org/changeset/base/208555 Log: Ignore the 'addr' argument passed to PT_STEP (it is required to be '1' for PT_STEP which means "ignore") and PT_DETACH. PR: kern/146167 MFC after: 1 week Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Tue May 25 21:20:56 2010 (r208554) +++ head/sys/kern/sys_process.c Tue May 25 21:32:37 2010 (r208555) @@ -899,24 +899,29 @@ kern_ptrace(struct thread *td, int req, if (error) goto out; break; + case PT_CONTINUE: case PT_TO_SCE: - p->p_stops |= S_PT_SCE; - break; case PT_TO_SCX: - p->p_stops |= S_PT_SCX; - break; case PT_SYSCALL: - p->p_stops |= S_PT_SCE | S_PT_SCX; - break; - } - - if (addr != (void *)1) { - error = ptrace_set_pc(td2, (u_long)(uintfptr_t)addr); - if (error) + if (addr != (void *)1) { + error = ptrace_set_pc(td2, + (u_long)(uintfptr_t)addr); + if (error) + goto out; + } + switch (req) { + case PT_TO_SCE: + p->p_stops |= S_PT_SCE; break; - } - - if (req == PT_DETACH) { + case PT_TO_SCX: + p->p_stops |= S_PT_SCX; + break; + case PT_SYSCALL: + p->p_stops |= S_PT_SCE | S_PT_SCX; + break; + } + break; + case PT_DETACH: /* reset process parent */ if (p->p_oppid != p->p_pptr->p_pid) { struct proc *pp; @@ -941,6 +946,7 @@ kern_ptrace(struct thread *td, int req, /* should we send SIGCHLD? */ /* childproc_continued(p); */ + break; } sendsig: