Home | History | Annotate | Line # | Download | only in conf
debugsyms.c revision 1.2
      1  1.2     ad /*	$NetBSD: debugsyms.c,v 1.2 2008/06/06 13:21:00 ad Exp $	*/
      2  1.1  joerg /*
      3  1.1  joerg  * This file is in the public domain.
      4  1.1  joerg  */
      5  1.1  joerg 
      6  1.1  joerg #include <sys/cdefs.h>
      7  1.2     ad __KERNEL_RCSID(0, "$NetBSD: debugsyms.c,v 1.2 2008/06/06 13:21:00 ad Exp $");
      8  1.1  joerg 
      9  1.1  joerg #define	_CALLOUT_PRIVATE
     10  1.1  joerg #define	__MUTEX_PRIVATE
     11  1.1  joerg 
     12  1.1  joerg #include <sys/param.h>
     13  1.1  joerg #include <sys/lwp.h>
     14  1.1  joerg #include <sys/mbuf.h>
     15  1.1  joerg #include <sys/mutex.h>
     16  1.1  joerg #include <sys/proc.h>
     17  1.1  joerg #include <sys/sched.h>
     18  1.1  joerg #include <sys/sleepq.h>
     19  1.1  joerg #include <sys/time.h>
     20  1.1  joerg #include <sys/ucontext.h>
     21  1.1  joerg #include <sys/uio.h>
     22  1.1  joerg #include <sys/un.h>
     23  1.1  joerg #include <sys/unpcb.h>
     24  1.1  joerg #include <sys/user.h>
     25  1.1  joerg #include <sys/vnode.h>
     26  1.2     ad 
     27  1.2     ad /*
     28  1.2     ad  * Without a dummy function referencing some of the types, gcc will
     29  1.2     ad  * not emit any debug information.
     30  1.2     ad  */
     31  1.2     ad proc_t	*_debugsym_dummyfunc(vnode_t *vp);
     32  1.2     ad 
     33  1.2     ad proc_t *
     34  1.2     ad _debugsym_dummyfunc(vnode_t *vp)
     35  1.2     ad {
     36  1.2     ad 
     37  1.2     ad 	return ((lwp_t *)vp->v_mount)->l_proc;
     38  1.2     ad }
     39