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