From owner-cvs-all@FreeBSD.ORG Fri Aug 4 16:24:31 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C68A016A4DF; Fri, 4 Aug 2006 16:24:31 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3998843D5F; Fri, 4 Aug 2006 16:24:28 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.4.150] (pptp0.pn.xcllnt.net [192.168.4.150]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k74GO5RT030919; Fri, 4 Aug 2006 09:24:06 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <20060804070348.GR97316@comp.chem.msu.su> References: <200608030959.k739x9N6007207@repoman.freebsd.org> <44D22E2F.4070307@errno.com> <20060803180854.GI97316@comp.chem.msu.su> <200608031458.01134.jhb@freebsd.org> <20060804070348.GR97316@comp.chem.msu.su> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <6B15CBE0-00E0-4F64-A652-4A4B614975C2@xcllnt.net> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Fri, 4 Aug 2006 09:23:52 -0700 To: Yar Tikhiy X-Mailer: Apple Mail (2.752.2) Cc: Sam Leffler , src-committers@FreeBSD.org, cvs-all@FreeBSD.org, John Baldwin , cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/net if_vlan.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2006 16:24:31 -0000 On Aug 4, 2006, at 12:03 AM, Yar Tikhiy wrote: > Just noticed that many calls to kdb_backtrace() are under "#ifdef > KDB" while subr_kdb.c is marked as standard in /sys/conf/files and > the function itself is always available (yet can do nothing.) > > Should calls to kdb_backtrace() be put under "#ifdef KDB"? If they > should, it can justify introducing the combined printf+trace function. subr_kdb.c is indeed unconditional. The reason is that it contains the interface functions and you should not make interface functions optional if modules can reference them. The KDB option is there to tell that one wants debugging features enabled. This means for example that serial drivers react to the line break condition by going into the debugger. Without the KDB option line break conditions just result in a 0-character in the input stream. So, putting the kdb_backtrace() under KDB is not a matter of said function not being present without KDB, it's that we don't want to emit backtraces when debugging is not enabled. Backtraces are a debugging tool and it makes sense to emit them only when the kernel is configured for debugging. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net