From owner-svn-src-all@FreeBSD.ORG Tue Oct 12 19:24:42 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 648591065695; Tue, 12 Oct 2010 19:24:42 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38C9B8FC0A; Tue, 12 Oct 2010 19:24:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CJOgwB059489; Tue, 12 Oct 2010 19:24:42 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CJOgwn059485; Tue, 12 Oct 2010 19:24:42 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010121924.o9CJOgwn059485@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 12 Oct 2010 19:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: 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: Tue, 12 Oct 2010 19:24:42 -0000 Author: obrien Date: Tue Oct 12 19:24:41 2010 New Revision: 213744 URL: http://svn.freebsd.org/changeset/base/213744 Log: If DEBUG is 3 or greater, disable STATICization of functions. Also correct the documented location of the trace file. Modified: head/bin/sh/Makefile head/bin/sh/shell.h head/bin/sh/show.c Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Tue Oct 12 19:24:29 2010 (r213743) +++ head/bin/sh/Makefile Tue Oct 12 19:24:41 2010 (r213744) @@ -21,7 +21,7 @@ LDADD= -ll -ledit -ltermcap LFLAGS= -8 # 8-bit lex scanner for arithmetic CFLAGS+=-DSHELL -I. -I${.CURDIR} # for debug: -# CFLAGS+= -g -DDEBUG=2 +# CFLAGS+= -g -DDEBUG=3 WARNS?= 2 WFORMAT=0 Modified: head/bin/sh/shell.h ============================================================================== --- head/bin/sh/shell.h Tue Oct 12 19:24:29 2010 (r213743) +++ head/bin/sh/shell.h Tue Oct 12 19:24:41 2010 (r213744) @@ -43,8 +43,9 @@ * JOBS -> 1 if you have Berkeley job control, 0 otherwise. * define DEBUG=1 to compile in debugging (set global "debug" to turn on) * define DEBUG=2 to compile in and turn on debugging. + * define DEBUG=3 to also build all functions as public * - * When debugging is on, debugging info will be written to $HOME/trace and + * When debugging is on, debugging info will be written to ./trace and * a quit signal will generate a core dump. */ @@ -61,7 +62,11 @@ typedef intmax_t arith_t; #define strtoarith_t(nptr, endptr, base) strtoimax(nptr, endptr, base) typedef void *pointer; +#if DEBUG >= 3 +#define STATIC +#else #define STATIC static +#endif #define MKINIT /* empty */ #include Modified: head/bin/sh/show.c ============================================================================== --- head/bin/sh/show.c Tue Oct 12 19:24:29 2010 (r213743) +++ head/bin/sh/show.c Tue Oct 12 19:24:41 2010 (r213744) @@ -274,7 +274,7 @@ indent(int amount, char *pfx, FILE *fp) FILE *tracefile; -#if DEBUG == 2 +#if DEBUG >= 2 int debug = 1; #else int debug = 0;