Date: Mon, 31 Dec 2007 19:14:56 +0000 From: David Taylor <davidt@yadt.co.uk> To: freebsd-stable@freebsd.org Subject: [PATCH] 7-STABLE Build broken in geom_io.c with KTR but no DDB Message-ID: <20071231191455.GA74675@outcold.yadt.co.uk>
next in thread | raw e-mail | index | archive | help
--17pEHd4RhPHOinZp Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Hi, I've been trying to do some debugging with ktrace(9) for the first time, and ran in to a problem after trying to compile the kernel. I didn't have DDB defined, and as a result the build failed after adding "option KTR": geom_io.o(.text+0x5ee): In function `g_alloc_bio': ../../../geom/geom_io.c:140: undefined reference to `stack_save' geom_io.o(.text+0x61e):../../../geom/geom_io.c:141: undefined reference to `stack_ktr' geom_io.o(.text+0x6e1): In function `g_clone_bio': The use of CTRx in the geom code appears to be correctly wrapped with #ifdef KTR, but this is also all that protects the uses of CTRSTACK. CTRSTACK is also defined to use stack_ktr conditionally on #ifdef KTR in sys/stack.h, but the stack_ktr function is compiled in to the kernel only if DDB is enabled. Perhaps CTRSTACK should be non-empty only if both DDB and KTR are defined? -- David Taylor --17pEHd4RhPHOinZp Content-Type: text/x-diff; charset=iso-8859-15 Content-Disposition: attachment; filename="sys_stack_h.diff" Index: sys/stack.h =================================================================== RCS file: /home/ncvs/src/sys/sys/stack.h,v retrieving revision 1.2 diff -u -r1.2 stack.h --- sys/stack.h 29 Aug 2005 11:34:08 -0000 1.2 +++ sys/stack.h 31 Dec 2007 19:14:10 -0000 @@ -46,7 +46,7 @@ void stack_zero(struct stack *); void stack_print(struct stack *); void stack_sbuf_print(struct sbuf *, struct stack *); -#ifdef KTR +#if defined(DDB) && defined(KTR) void stack_ktr(u_int, const char *, int, struct stack *, u_int, int); #define CTRSTACK(m, st, depth, cheap) do { \ if (KTR_COMPILE & (m)) \ --17pEHd4RhPHOinZp--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071231191455.GA74675>