shithub: scc

Download patch

ref: fbd8dfe6829353e38efd2cade078e3a7ae3ddef3
parent: b44a95b8fbe1a524074dfcb96ee5efb89c9a1c9a
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Feb 24 01:03:36 EST 2017

[cc1] Add debug information to pushctx() and popctx()

This debug information is useful to understand how
the context stack is evoluting in the time.

--- a/cc1/symbol.c
+++ b/cc1/symbol.c
@@ -97,6 +97,7 @@
 void
 pushctx(void)
 {
+	DBG("SYM: pushed context %d", curctx+1);
 	if (++curctx == NR_BLOCK+1)
 		error("too many nested blocks");
 }
@@ -131,6 +132,7 @@
 	Symbol *next, *sym;
 	int ns, dangling = 0;
 
+	DBG("SYM: poped context %d", curctx);
 	/*
 	 * we have to be careful before popping the current
 	 * context, because since the parser is one token