Home | History | Annotate | Line # | Download | only in conf
debugsyms.c revision 1.1.18.1
      1  1.1.18.1   yamt /*	$NetBSD: debugsyms.c,v 1.1.18.1 2009/05/04 08:12:29 yamt 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.1.18.1   yamt __KERNEL_RCSID(0, "$NetBSD: debugsyms.c,v 1.1.18.1 2009/05/04 08:12:29 yamt 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.1.18.1   yamt 
     27  1.1.18.1   yamt /*
     28  1.1.18.1   yamt  * Without a dummy function referencing some of the types, gcc will
     29  1.1.18.1   yamt  * not emit any debug information.
     30  1.1.18.1   yamt  */
     31  1.1.18.1   yamt proc_t	*_debugsym_dummyfunc(vnode_t *vp);
     32  1.1.18.1   yamt 
     33  1.1.18.1   yamt proc_t *
     34  1.1.18.1   yamt _debugsym_dummyfunc(vnode_t *vp)
     35  1.1.18.1   yamt {
     36  1.1.18.1   yamt 
     37  1.1.18.1   yamt 	return ((lwp_t *)vp->v_mount)->l_proc;
     38  1.1.18.1   yamt }
     39