Mercurial > ~dholland > hg > tradcpp > index.cgi
diff eval.c @ 199:1d2bad7151f9
Add a -debuglog option to send an execution trace to a file.
Intended to be used when debugging imake templates and other complex
input, not for debugging tradcpp itself.
author | David A. Holland |
---|---|
date | Sun, 04 Sep 2016 17:14:42 -0400 (2016-09-04) |
parents | 33954a07d013 |
children | 3a25180d3a5c |
line wrap: on
line diff
--- a/eval.c Sat Dec 05 18:08:24 2015 -0500 +++ b/eval.c Sun Sep 04 17:14:42 2016 -0400 @@ -642,6 +642,7 @@ complain_fail(); } } + debuglog(p, "Undefined symbol %s; substituting 0", word); return 0; } @@ -744,6 +745,7 @@ #ifdef DEBUG fprintf(stderr, "eval: %s\n", expr); #endif + debuglog(p, "eval: %s", expr); tokenarray_init(&tokens); tokenize(p, expr);