svn commit: r208719 - stable/7/sys/kern
John Baldwin
jhb at FreeBSD.org
Tue Jun 1 19:39:28 UTC 2010
Author: jhb
Date: Tue Jun 1 19:39:27 2010
New Revision: 208719
URL: http://svn.freebsd.org/changeset/base/208719
Log:
MFC 208555:
Ignore the 'addr' argument passed to PT_STEP (it is required to be '1'
for PT_STEP which means "ignore") and PT_DETACH.
Modified:
stable/7/sys/kern/sys_process.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/cddl/contrib/opensolaris/ (props changed)
stable/7/sys/contrib/dev/acpica/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/kern/sys_process.c
==============================================================================
--- stable/7/sys/kern/sys_process.c Tue Jun 1 19:38:46 2010 (r208718)
+++ stable/7/sys/kern/sys_process.c Tue Jun 1 19:39:27 2010 (r208719)
@@ -731,24 +731,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;
@@ -773,6 +778,7 @@ kern_ptrace(struct thread *td, int req,
/* should we send SIGCHLD? */
/* childproc_continued(p); */
+ break;
}
sendsig:
More information about the svn-src-stable-7
mailing list