From owner-svn-src-all@FreeBSD.ORG Wed Oct 13 13:31:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0CEB106566B; Wed, 13 Oct 2010 13:31:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9C5E68FC15; Wed, 13 Oct 2010 13:31:19 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 42D1046BA9; Wed, 13 Oct 2010 09:31:19 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 18C288A01D; Wed, 13 Oct 2010 09:31:18 -0400 (EDT) From: John Baldwin To: Bruce Evans Date: Wed, 13 Oct 2010 09:07:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201010121924.o9CJOgwn059485@svn.freebsd.org> <20101013040543.GB13694@dragon.NUXI.org> <20101013152037.S2102@besplex.bde.org> In-Reply-To: <20101013152037.S2102@besplex.bde.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010130907.59715.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 13 Oct 2010 09:31:18 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David O'Brien Subject: Re: svn commit: r213744 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2010 13:31:19 -0000 On Wednesday, October 13, 2010 12:29:27 am Bruce Evans wrote: > On Tue, 12 Oct 2010, David O'Brien wrote: > > > On Wed, Oct 13, 2010 at 02:18:33PM +1100, Bruce Evans wrote: > >> On Tue, 12 Oct 2010, David E. O'Brien wrote: > >>> Log: > >>> If DEBUG is 3 or greater, disable STATICization of functions. > >>> Also correct the documented location of the trace file. > >> > >> Private functions should always be static, which no `#define STATIC static' > > [..] > >> In theory, the debugging info should make it possible for debuggers > >> to restore the semantics of not-explictly-inline functions by virtualizing > >> them, but gdb's debugging info and/or gdb are too primitive to do this > >> (gdb doesn't allow putting a breakpoint at a deleted static function, > > > > This is actually what my motivation is -- trying to set breakpoints and > > finding GDB was unable to. > > > >> Of course, debugging and profiling are magic, > >> but I don't want to have to adorn all functions with STATICs and > >> __attributes() (and pragmas for othercc...) to recover historical/normal > >> or variant debugging or profiling of them. > > > > I agree, and would not add STATIC's to a program's code that didn't > > already have them. But in this case we inherited it from 4.4BSD. > > I'm just making it actually do something other than being a gratuitous > > spelling change. > > > > I believe I've made things more consistent with r213760. > > Add __noinline or whatever attributes to STATIC (but keep static in > it) for the DEBUG >= 3 case if you are going that far. __noinline > should be a syntax error for variables, so this should also find any > STATICs still on variables. The spelling fix of changing STATIC to > what it actually means > (ASSORTED_HACKS_FOR_DEBUGGING_BUT_NOW_ONLY_FOR_FUNCTIONS) goes too far > for me. To be honest, I think changing STATIC is excessive churn. The "right" fix is to use 'make DEBUG_FLAGS="-g -DDEBUG=2 -fno-inline"'. I often use 'make DEBUG_FLAGS="-g -fno-inline"' to workaround excessive inlining when debugging. I think all of the STATIC changes should just be backed out. -- John Baldwin