summaryrefslogtreecommitdiff
path: root/usr.bin/make/parse.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2022-01-08 23:52:26 +0000
committerrillig <rillig@NetBSD.org>2022-01-08 23:52:26 +0000
commitd48447f3b87f33a889afb03c27be3947369bfcb2 (patch)
treea0b612c69c609571069e018b4e6278122d77b51e /usr.bin/make/parse.c
parent3fbc0bc7ebcbe68118d7f31f3c2b3916f6b90f15 (diff)
make: add details about .for loop variables to stack traces
The stack traces are enabled with the debug logging option '-dp'.
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r--usr.bin/make/parse.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index acb805935db..c7e86d98f6a 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.643 2022/01/08 23:41:43 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.644 2022/01/08 23:52:26 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.643 2022/01/08 23:41:43 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.644 2022/01/08 23:52:26 rillig Exp $");
/*
* A file being read.
@@ -353,8 +353,10 @@ PrintStackTrace(void)
fname = realpath(fname, dirbuf);
if (entry->forLoop != NULL) {
- debug_printf("\tin .for loop from %s:%d\n",
- fname, entry->forHeadLineno);
+ char *details = ForLoop_Details(entry->forLoop);
+ debug_printf("\tin .for loop from %s:%d with %s\n",
+ fname, entry->forHeadLineno, details);
+ free(details);
} else {
int lineno =
i + 1 < n && entries[i + 1].forLoop != NULL