From dfa0ffc7c86951f332886c661e930a834f5c9a36 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 8 Jul 2011 19:28:39 +0000 Subject: Support sending struct info to kdump. So far for struct stat and struct sockaddress; mostly from freebsd. ok deraadt@ tedu@ nicm@ --- sys/kern/kern_descrip.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/kern/kern_descrip.c') diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 0d3a6d1a627..7ead57404e6 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.86 2011/04/02 17:04:35 guenther Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.87 2011/07/08 19:28:36 otto Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -59,6 +59,7 @@ #include #include #include +#include #include @@ -632,6 +633,10 @@ sys_fstat(struct proc *p, void *v, register_t *retval) error = copyout((caddr_t)&ub, (caddr_t)SCARG(uap, sb), sizeof (ub)); } +#ifdef KTRACE + if (error == 0 && KTRPOINT(p, KTR_STRUCT)) + ktrstat(p, &ub); +#endif return (error); } -- cgit v1.2.3