Module Name: src
Committed By: simonb
Date: Mon Mar 29 03:22:18 UTC 2021
Modified Files:
src/sys/arch/mips/mips: trap.c
Log Message:
(Very) minimal kernel support for dtrace on MIPS; enough to system call
tracing to work for example.
To generate a diff of this commit:
cvs rdiff -u -r1.259 -r1.260 src/sys/arch/mips/mips/trap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/mips/trap.c
diff -u src/sys/arch/mips/mips/trap.c:1.259 src/sys/arch/mips/mips/trap.c:1.260
--- src/sys/arch/mips/mips/trap.c:1.259 Wed Mar 17 11:05:37 2021
+++ src/sys/arch/mips/mips/trap.c Mon Mar 29 03:22:17 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.259 2021/03/17 11:05:37 simonb Exp $ */
+/* $NetBSD: trap.c,v 1.260 2021/03/29 03:22:17 simonb Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,10 +39,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.259 2021/03/17 11:05:37 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.260 2021/03/29 03:22:17 simonb Exp $");
#include "opt_cputype.h" /* which mips CPU levels do we support? */
#include "opt_ddb.h"
+#include "opt_dtrace.h"
#include "opt_kgdb.h"
#include "opt_multiprocessor.h"
@@ -804,6 +805,16 @@ mips_singlestep(struct lwp *l)
return 0;
}
+#ifdef KDTRACE_HOOKS
+#include <sys/dtrace_bsd.h>
+
+/* Not used for now, but needed for dtrace/fbt modules */
+dtrace_doubletrap_func_t dtrace_doubletrap_func = NULL;
+dtrace_trap_func_t dtrace_trap_func = NULL;
+
+int (* dtrace_invop_jump_addr)(struct trapframe *);
+#endif /* KDTRACE_HOOKS */
+
#ifdef TRAP_SIGDEBUG
static void
frame_dump(const struct trapframe *tf, struct pcb *pcb)
@@ -863,4 +874,4 @@ sigdebug(const struct trapframe *tf, con
e);
frame_dump(tf, lwp_getpcb(l));
}
-#endif
+#endif /* TRAP_SIGDEBUG */