summaryrefslogtreecommitdiff
path: root/sys/arch/sun3
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-05-16 21:11:22 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-05-16 21:11:22 +0000
commit76357e74b51c1e82b9c7bf25aa00dd8d38359854 (patch)
treee033e746322cf6955d8ef97c2da6c4257afd634a /sys/arch/sun3
parent9a3de556680432e50b57a65fbc16306e09ab7301 (diff)
Add systrace support to all the remaining architectures.
Tested by various people on various platforms, I'm willing to fix any breakage this causes. ok niels@ deraadt@ and mickey@ (after his comments were applied)
Diffstat (limited to 'sys/arch/sun3')
-rw-r--r--sys/arch/sun3/sun3/conf.c5
-rw-r--r--sys/arch/sun3/sun3/trap.c12
2 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/sun3/sun3/conf.c b/sys/arch/sun3/sun3/conf.c
index 2a9917fab18..3f1ebfef1d4 100644
--- a/sys/arch/sun3/sun3/conf.c
+++ b/sys/arch/sun3/sun3/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.31 2001/12/11 23:19:02 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.32 2002/05/16 21:11:18 miod Exp $ */
/* $NetBSD: conf.c,v 1.51 1996/11/04 16:16:09 gwr Exp $ */
/*-
@@ -113,6 +113,8 @@ int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -205,6 +207,7 @@ struct cdevsw cdevsw[] =
cdev_ch_init(NCH,ch), /* 83: SCSI autochanger */
cdev_ses_init(NSES,ses), /* 84: SCSI SES or SAF-TE device */
cdev_altq_init(NALTQ,altq), /* 85: ALTQ control interface */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 86: system call tracing */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/sun3/sun3/trap.c b/sys/arch/sun3/sun3/trap.c
index 0605c2ecf8e..492957233be 100644
--- a/sys/arch/sun3/sun3/trap.c
+++ b/sys/arch/sun3/sun3/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.32 2002/03/14 01:26:47 millert Exp $ */
+/* $OpenBSD: trap.c,v 1.33 2002/05/16 21:11:18 miod Exp $ */
/* $NetBSD: trap.c,v 1.63-1.65ish 1997/01/16 15:41:40 gwr Exp $ */
/*
@@ -58,6 +58,9 @@
#include <sys/ktrace.h>
#endif
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <uvm/uvm_pmap.h>
@@ -704,7 +707,12 @@ syscall(code, frame)
goto bad;
rval[0] = 0;
rval[1] = frame.f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, args, rval);
switch (error) {
case 0:
frame.f_regs[D0] = rval[0];