summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2003-10-09 10:17:16 +0000
committerrobert <robert@FreeBSD.org>2003-10-09 10:17:16 +0000
commit8519aa2ff041ebfe2fa21adb87df58dd07ab461a (patch)
treed286b80736e6c9743f984bcdfc12b33ff7eff197 /sys/i386
parent20b1e12f1fef844ae5a2932fcacde82b2bd55ffa (diff)
downloadFreeBSD-src-8519aa2ff041ebfe2fa21adb87df58dd07ab461a.zip
FreeBSD-src-8519aa2ff041ebfe2fa21adb87df58dd07ab461a.tar.gz
Implement preliminary support for the PT_SYSCALL command to ptrace(2).
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/trap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index ee9e6b9..f5fe14f 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/pioctl.h>
+#include <sys/ptrace.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
@@ -1003,6 +1004,8 @@ syscall(frame)
STOPEVENT(p, S_SCE, narg);
+ PTRACESTOP_SC(p, td, S_PT_SCE);
+
error = (*callp->sy_call)(td, args);
}
@@ -1067,6 +1070,8 @@ syscall(frame)
*/
STOPEVENT(p, S_SCX, code);
+ PTRACESTOP_SC(p, td, S_PT_SCX);
+
#ifdef DIAGNOSTIC
cred_free_thread(td);
#endif
OpenPOWER on IntegriCloud