Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern For PT_SYSCALLEMU, no need to stop again on syscall...
details: https://anonhg.NetBSD.org/src/rev/2a04a36a244c
branches: trunk
changeset: 769131:2a04a36a244c
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Aug 31 23:42:46 2011 +0000
description:
For PT_SYSCALLEMU, no need to stop again on syscall exit.
diffstat:
sys/kern/kern_subr.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (46 lines):
diff -r 9861f145562e -r 2a04a36a244c sys/kern/kern_subr.c
--- a/sys/kern/kern_subr.c Wed Aug 31 23:04:33 2011 +0000
+++ b/sys/kern/kern_subr.c Wed Aug 31 23:42:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_subr.c,v 1.210 2011/08/31 22:58:39 jmcneill Exp $ */
+/* $NetBSD: kern_subr.c,v 1.211 2011/08/31 23:42:46 jmcneill Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.210 2011/08/31 22:58:39 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.211 2011/08/31 23:42:46 jmcneill Exp $");
#include "opt_ddb.h"
#include "opt_md.h"
@@ -701,7 +701,6 @@
if (curlwp->l_proc->p_slflag & PSL_SYSCALLEMU) {
/* tracer will emulate syscall for us */
error = EJUSTRETURN;
- CLR(curlwp->l_proc->p_slflag, PSL_SYSCALLEMU);
}
}
#endif
@@ -718,6 +717,8 @@
void
trace_exit(register_t code, register_t rval[], int error)
{
+ struct proc *p = curlwp->l_proc;
+
#ifdef SYSCALL_DEBUG
scdebug_ret(code, error, rval);
#endif /* SYSCALL_DEBUG */
@@ -725,8 +726,9 @@
ktrsysret(code, error, rval);
#ifdef PTRACE
- if ((curlwp->l_proc->p_slflag & (PSL_SYSCALL|PSL_TRACED)) ==
+ if ((p->p_slflag & (PSL_SYSCALL|PSL_TRACED|PSL_SYSCALLEMU)) ==
(PSL_SYSCALL|PSL_TRACED))
process_stoptrace();
+ CLR(p->p_slflag, PSL_SYSCALLEMU);
#endif
}
Home |
Main Index |
Thread Index |
Old Index