diff main.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
parents f5981d0ee2b4
children 3a25180d3a5c
line wrap: on
line diff
--- a/main.c	Sat Dec 05 18:08:24 2015 -0500
+++ b/main.c	Sun Sep 04 17:14:42 2016 -0400
@@ -829,6 +829,7 @@
 	{ "MF",          commandline_setdependoutput },
 	{ "MQ",          commandline_setdependtarget_quoted },
 	{ "MT",          commandline_setdependtarget },
+	{ "debuglog",    debuglog_open },
 	{ "idirafter",   commandline_addincpath_late },
 	{ "imacros",     commandline_addfile_nooutput },
 	{ "include",     commandline_addfile_output },
@@ -1014,6 +1015,7 @@
 	commandline_files_cleanup();
 	commandline_macros_cleanup();
 	incpath_cleanup();
+	debuglog_close();
 
 	num = stringarray_num(&freestrings);
 	for (i=0; i<num; i++) {