From owner-freebsd-hackers Wed Jul 31 10:21:36 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA11238 for hackers-outgoing; Wed, 31 Jul 1996 10:21:36 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA11231 for ; Wed, 31 Jul 1996 10:21:35 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA02301; Wed, 31 Jul 1996 10:20:27 -0700 From: Terry Lambert Message-Id: <199607311720.KAA02301@phaeton.artisoft.com> Subject: Re: kernel assertions (Rev. 1) To: michaelv@HeadCandy.com (Michael L. VanLoon -- HeadCandy.com) Date: Wed, 31 Jul 1996 10:20:26 -0700 (MST) Cc: michaelh@cet.co.jp, Hackers@FreeBSD.ORG In-Reply-To: <199607310640.XAA02552@MindBender.HeadCandy.com> from "Michael L. VanLoon -- HeadCandy.com" at Jul 30, 96 11:40:05 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > >The REQUIRE2 stuff can replace the > > > >#ifdef DIAGNOSTICS > > if (expr) > > panic(expl); > >#endif > > I prefer asserts to call "Debugger()", rather than "panic()", and > that's how I write my assertion macros. How are you supposed to debug > something if it panics? By having: #ifdef DIAGNOSTICS Debugger(exp1); return; #endif /* DIAGNOSTICS*/ In panic? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.