summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
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/powerpc
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/powerpc')
-rw-r--r--sys/arch/powerpc/powerpc/trap.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c
index 6300e4d3a71..1729b29acef 100644
--- a/sys/arch/powerpc/powerpc/trap.c
+++ b/sys/arch/powerpc/powerpc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.47 2002/05/15 22:49:16 drahn Exp $ */
+/* $OpenBSD: trap.c,v 1.48 2002/05/16 21:11:17 miod Exp $ */
/* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */
/*
@@ -52,6 +52,9 @@
#include <machine/trap.h>
#include <machine/db_machdep.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <ddb/db_extern.h>
@@ -442,11 +445,18 @@ printf("isi iar %x lr %x\n", frame->srr0, frame->lr);
rval[1] = frame->fixreg[FIRSTARG + 1];
#ifdef SYSCALL_DEBUG
- scdebug_call(p, code, params);
+ scdebug_call(p, code, params);
#endif
- switch (error = (*callp->sy_call)(p, params, rval)) {
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, params,
+ rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, params, rval);
+ switch (error) {
case 0:
frame->fixreg[0] = error;
frame->fixreg[FIRSTARG] = rval[0];