Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): with -dp, print name of the function i...



details:   https://anonhg.NetBSD.org/src/rev/b5fcbe22781b
branches:  trunk
changeset: 954652:b5fcbe22781b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Sep 07 18:37:09 2020 +0000

description:
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.

diffstat:

 usr.bin/make/parse.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 87cc8d3172e9 -r b5fcbe22781b usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Mon Sep 07 18:29:48 2020 +0000
+++ b/usr.bin/make/parse.c      Mon Sep 07 18:37:09 2020 +0000
@@ -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 @@
        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 */



Home | Main Index | Thread Index | Old Index