From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 08:12:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D30816A4C9 for ; Wed, 13 Dec 2006 08:12:28 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id 750DD43D31 for ; Wed, 13 Dec 2006 08:10:46 +0000 (GMT) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5D66E.dip.t-dialin.net [84.165.214.110]) by redbull.bpaserver.net (Postfix) with ESMTP id 175D32E06F; Wed, 13 Dec 2006 09:12:04 +0100 (CET) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 614715B4845; Wed, 13 Dec 2006 09:11:59 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id kBD8BwcB008931; Wed, 13 Dec 2006 09:11:58 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Wed, 13 Dec 2006 09:11:58 +0100 Message-ID: <20061213091158.2mp4nnxi8kw0cko0@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Wed, 13 Dec 2006 09:11:58 +0100 From: Alexander Leidinger To: Kevin Sanders References: <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> <20061212231039.GA4531@britannica.bec.de> <375baf50612121703o3c9f7edcyaf4a3589ca8050c5@mail.gmail.com> In-Reply-To: <375baf50612121703o3c9f7edcyaf4a3589ca8050c5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.864, required 6, autolearn=not spam, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Wed, 13 Dec 2006 12:52:50 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: KASSERT in kernel module outside src/sys X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 08:12:28 -0000 Quoting Kevin Sanders (from Tue, 12 Dec 2006 17:03:24 -0800): > On 12/12/06, Joerg Sonnenberger wrote: >> On Tue, Dec 12, 2006 at 02:30:41PM -0800, Kevin Sanders wrote: >>> I'm trying to use KASSERT in my own kernel module and I can't get it >>> to assert even with a KASSERT(0, "test panic"). Is there something >>> else I need to do besides add options INVARIANTS to my kernel config >>> file. Any clues would be appreciated. >> >> Tried >> CFLAGS+= -DINVARIANTS >> in the Makefile of the module? > > Thanks all. That almost works, I'm getting a syntax error before > string constant. I took the easy way and undefined and redefined > KASSERT to panic when the condition is false for now. Try: KASSERT(0, ("string")) Bye, Alexander. -- Hold the MAYO & pass the COSMIC AWARENESS ... http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137