Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: crash build problem



Patrick Welche wrote:
/usr/src/usr.sbin/crash/../../sys/arch/i386/i386/db_trace.c: In function 
'db_stack_trace_print':
/usr/src/usr.sbin/crash/../../sys/arch/i386/i386/db_trace.c:456: warning: 
implicit declaration of function 'lwp_getpcb'
/usr/src/usr.sbin/crash/../../sys/arch/i386/i386/db_trace.c:456: warning: 
assignment makes pointer from integer without a cast
*** Error code 1
[...]
I tried

Index: db_trace.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/db_trace.c,v
retrieving revision 1.64
diff -u -r1.64 db_trace.c
--- db_trace.c  21 Nov 2009 03:11:00 -0000      1.64
+++ db_trace.c  21 Nov 2009 16:31:49 -0000
@@ -33,6 +33,7 @@
 #include <sys/systm.h>
 #include <sys/proc.h>
#include <sys/intr.h> +#include <sys/lwp.h> #include <sys/cpu.h> #include <machine/db_machdep.h>


db_trace.c is compiled twice, once as part of the "crash" utility, and once
as part of a kernel build, but lwp.h only defines it for _KERNEL, so the
declaration of lwp_getpcb should be moved outside of "#if _KENREL",
and the include of lwp.h is not necessary in db_trace.c.


Home | Main Index | Thread Index | Old Index