Module Name:    src
Committed By:   rillig
Date:           Sun Oct 25 17:12:51 UTC 2020

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

Log Message:
make(1): add more details to DEBUG_SRC log


To generate a diff of this commit:
cvs rdiff -u -r1.223 -r1.224 src/usr.bin/make/suff.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/suff.c
diff -u src/usr.bin/make/suff.c:1.223 src/usr.bin/make/suff.c:1.224
--- src/usr.bin/make/suff.c:1.223	Sun Oct 25 10:00:20 2020
+++ src/usr.bin/make/suff.c	Sun Oct 25 17:12:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: suff.c,v 1.223 2020/10/25 10:00:20 rillig Exp $	*/
+/*	$NetBSD: suff.c,v 1.224 2020/10/25 17:12:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -129,7 +129,7 @@
 #include "dir.h"
 
 /*	"@(#)suff.c	8.4 (Berkeley) 3/21/94"	*/
-MAKE_RCSID("$NetBSD: suff.c,v 1.223 2020/10/25 10:00:20 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.224 2020/10/25 17:12:51 rillig Exp $");
 
 #define SUFF_DEBUG0(text) DEBUG0(SUFF, text)
 #define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1)
@@ -875,7 +875,8 @@ SuffAddSrc(Suff *suff, SrcList *srcList,
     Lst_Append(srcList, s2);
 #ifdef DEBUG_SRC
     Lst_Append(targ->childrenList, s2);
-    debug_printf("%s add %p %p to %p:", debug_tag, targ, s2, srcList);
+    debug_printf("%s add suff %p src %p to list %p:",
+		 debug_tag, targ, s2, srcList);
     SrcList_PrintAddrs(srcList);
 #endif
 }
@@ -927,7 +928,7 @@ SuffRemoveSrc(SrcList *l)
     SrcListNode *ln;
 
 #ifdef DEBUG_SRC
-    debug_printf("cleaning %p:", l);
+    debug_printf("cleaning list %p:", l);
     SrcList_PrintAddrs(l);
 #endif
 
@@ -947,7 +948,8 @@ SuffRemoveSrc(SrcList *l)
 		s->parent->children--;
 	    }
 #ifdef DEBUG_SRC
-	    debug_printf("free: [l=%p] p=%p %d\n", l, s, s->children);
+	    debug_printf("free: list %p src %p children %d\n",
+			 l, s, s->children);
 	    Lst_Free(s->childrenList);
 #endif
 	    Lst_Remove(l, ln);
@@ -956,7 +958,8 @@ SuffRemoveSrc(SrcList *l)
 	}
 #ifdef DEBUG_SRC
 	else {
-	    debug_printf("keep: [l=%p] p=%p %d:", l, s, s->children);
+	    debug_printf("keep: list %p src %p children %d:",
+			 l, s, s->children);
 	    SrcList_PrintAddrs(s->childrenList);
 	}
 #endif
@@ -989,7 +992,7 @@ SuffFindThem(SrcList *srcs, SrcList *sls
 	 */
 	if (Targ_FindNode(src->file) != NULL) {
 #ifdef DEBUG_SRC
-	    debug_printf("remove %p from %p\n", src, srcs);
+	    debug_printf("remove from list %p src %p\n", srcs, src);
 #endif
 	    retsrc = src;
 	    break;
@@ -1000,7 +1003,7 @@ SuffFindThem(SrcList *srcs, SrcList *sls
 	    if (file != NULL) {
 		retsrc = src;
 #ifdef DEBUG_SRC
-		debug_printf("remove %p from %p\n", src, srcs);
+		debug_printf("remove from list %p src %p\n", srcs, src);
 #endif
 		free(file);
 		break;
@@ -1099,7 +1102,7 @@ SuffFindCmds(Src *targ, SrcList *slst)
     suff->refCount++;
     targ->children++;
 #ifdef DEBUG_SRC
-    debug_printf("3 add %p %p\n", targ, ret);
+    debug_printf("3 add targ %p ret %p\n", targ, ret);
     Lst_Append(targ->childrenList, ret);
 #endif
     Lst_Append(slst, ret);

Reply via email to