1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

If DEBUG is 3 or greater, disable STATICization of functions.

Also correct the documented location of the trace file.
This commit is contained in:
David E. O'Brien 2010-10-12 19:24:41 +00:00
parent 45b40ad0da
commit 9d22cd9be8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213744
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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 <sys/cdefs.h>

View File

@ -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;