Module Name: src Committed By: christos Date: Thu Nov 15 16:42:26 UTC 2012
Modified Files: src/usr.bin/make: var.c Log Message: include the variable name in debugging printfs. To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.171 src/usr.bin/make/var.c:1.172 --- src/usr.bin/make/var.c:1.171 Tue Jun 12 15:21:51 2012 +++ src/usr.bin/make/var.c Thu Nov 15 11:42:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.171 2012/06/12 19:21:51 joerg Exp $ */ +/* $NetBSD: var.c,v 1.172 2012/11/15 16:42:26 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.171 2012/06/12 19:21:51 joerg Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.172 2012/11/15 16:42:26 christos Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.171 2012/06/12 19:21:51 joerg Exp $"); +__RCSID("$NetBSD: var.c,v 1.172 2012/11/15 16:42:26 christos Exp $"); #endif #endif /* not lint */ #endif @@ -2561,7 +2561,8 @@ ApplyModifiers(char *nstr, const char *t } apply_mods: if (DEBUG(VAR)) { - fprintf(debug_file, "Applying :%c to \"%s\"\n", *tstr, nstr); + fprintf(debug_file, "Applying[%s] :%c to \"%s\"\n", v->name, + *tstr, nstr); } newStr = var_Error; switch ((modifier = *tstr)) { @@ -3161,8 +3162,8 @@ ApplyModifiers(char *nstr, const char *t free(cp2); } if (DEBUG(VAR)) - fprintf(debug_file, "Pattern for [%s] is [%s]\n", nstr, - pattern); + fprintf(debug_file, "Pattern[%s] for [%s] is [%s]\n", + v->name, nstr, pattern); if (*tstr == 'M') { newStr = VarModify(ctxt, &parsestate, nstr, VarMatch, pattern); @@ -3517,7 +3518,8 @@ ApplyModifiers(char *nstr, const char *t } } if (DEBUG(VAR)) { - fprintf(debug_file, "Result of :%c is \"%s\"\n", modifier, newStr); + fprintf(debug_file, "Result[%s] of :%c is \"%s\"\n", + v->name, modifier, newStr); } if (newStr != nstr) {