summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
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/alpha
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/alpha')
-rw-r--r--sys/arch/alpha/alpha/conf.c6
-rw-r--r--sys/arch/alpha/alpha/trap.c12
2 files changed, 14 insertions, 4 deletions
diff --git a/sys/arch/alpha/alpha/conf.c b/sys/arch/alpha/alpha/conf.c
index 0f6eca1321f..fc468aa275d 100644
--- a/sys/arch/alpha/alpha/conf.c
+++ b/sys/arch/alpha/alpha/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.37 2002/01/23 05:21:03 ericj Exp $ */
+/* $OpenBSD: conf.c,v 1.38 2002/05/16 21:11:10 miod Exp $ */
/* $NetBSD: conf.c,v 1.16 1996/10/18 21:26:57 cgd Exp $ */
/*-
@@ -145,6 +145,8 @@ cdev_decl(pci);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -197,7 +199,7 @@ struct cdevsw cdevsw[] =
cdev_lpt_init(NULPT,ulpt), /* 47: USB printer */
cdev_ugen_init(NUGEN,ugen), /* 48: USB generic driver */
cdev_tty_init(NUCOM, ucom), /* 49: USB tty */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c
index 281696867f2..383576c598f 100644
--- a/sys/arch/alpha/alpha/trap.c
+++ b/sys/arch/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.34 2002/04/29 00:30:36 pvalchev Exp $ */
+/* $OpenBSD: trap.c,v 1.35 2002/05/16 21:11:10 miod Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
@@ -110,6 +110,9 @@
#endif
#include <sys/ptrace.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <machine/cpu.h>
@@ -704,7 +707,12 @@ syscall(code, framep)
if (error == 0) {
rval[0] = 0;
rval[1] = 0;
- error = (*callp->sy_call)(p, args + hidden, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, args + hidden, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, args + hidden, rval);
}
switch (error) {