Module Name:    src
Committed By:   rillig
Date:           Mon Sep  7 18:37:09 UTC 2020

Modified Files:
        src/usr.bin/make: parse.c

Log Message:
make(1): with -dp, print name of the function instead of its address

This makes the output a bit more reproducible.  There are still the file
descriptors, which may differ between different runs, but at least the
nextbuf function is printed using a symbolic name instead of a meaningless 
address.
Besides loadedfile_nextbuf, the only other function is ForIterate.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.287 src/usr.bin/make/parse.c:1.288
--- src/usr.bin/make/parse.c:1.287	Mon Sep  7 06:58:02 2020
+++ src/usr.bin/make/parse.c	Mon Sep  7 18:37:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.287 2020/09/07 06:58:02 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.288 2020/09/07 18:37:09 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.287 2020/09/07 06:58:02 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.288 2020/09/07 18:37:09 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.287 2020/09/07 06:58:02 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.288 2020/09/07 18:37:09 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2375,8 +2375,9 @@ Parse_SetInput(const char *name, int lin
 	ParseTrackInput(name);
 
     if (DEBUG(PARSE))
-	fprintf(debug_file, "%s: file %s, line %d, fd %d, nextbuf %p, arg %p\n",
-	    __func__, name, line, fd, nextbuf, arg);
+	fprintf(debug_file, "%s: file %s, line %d, fd %d, nextbuf %s, arg %p\n",
+		__func__, name, line, fd,
+		nextbuf == loadedfile_nextbuf ? "loadedfile" : "other", arg);
 
     if (fd == -1 && nextbuf == NULL)
 	/* sanity */

Reply via email to