From owner-cvs-all@FreeBSD.ORG Fri Aug 4 20:02:15 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 E5B4B16A4DD; Fri, 4 Aug 2006 20:02:15 +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 5F2AF43D45; Fri, 4 Aug 2006 20:02:15 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (localhost.xcllnt.net [127.0.0.1]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k74K1sI2031981; Fri, 4 Aug 2006 13:01:54 -0700 (PDT) (envelope-from marcel@ns1.xcllnt.net) Received: (from marcel@localhost) by ns1.xcllnt.net (8.13.6/8.13.6/Submit) id k74K1stG031980; Fri, 4 Aug 2006 13:01:54 -0700 (PDT) (envelope-from marcel) Date: Fri, 4 Aug 2006 13:01:54 -0700 From: Marcel Moolenaar To: John Baldwin Message-ID: <20060804200154.GC31805@ns1.xcllnt.net> References: <200608030959.k739x9N6007207@repoman.freebsd.org> <20060804070348.GR97316@comp.chem.msu.su> <6B15CBE0-00E0-4F64-A652-4A4B614975C2@xcllnt.net> <200608041314.24161.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200608041314.24161.jhb@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: Yar Tikhiy , src-committers@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org, Sam Leffler 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 20:02:16 -0000 On Fri, Aug 04, 2006 at 01:14:22PM -0400, John Baldwin wrote: > > > > 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. > > In practice this ends up being redundant though as to have kdb_backtrace() > actually do anything you have to have DDB in your kernel config, which > requires KDB. That's really an implementation detail. What if we get a new debugger backend that allows backtraces? What if the GDB backend is extended to allow backtraces? The point is that kdb_backtrace() is there if you want a backtrace and you call it based on whatever option that makes sense at the call-site or even unconditionally if that's the right thing. Whether there's actually a backend that can make a backtrace is really a seperate issue. We just happen to implement backtracing and unwinding by debuggers, but with an unwinder in the kernel on ia64, we really don't need a debugger in order to make a backtrace and it's not that unrealistic that I create a backend that can only do backtraces... > Places that call kdb_enter() aren't all #ifdef KDB IIRC. It's > just a feature that kdb_foo() functions become NOPs when the kernel isn't > configured for debugging, so I think the #ifdef KDB's would be redundant. None of the kdb_*() functions in src/sys/kern/subr_kdb.c turn into NOPs when option KDB is not present. They are all unconditionally functional by design and should therefore be called conditionally by consequence. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net