commit 3261788e3d8b7782ff0ade7b391572c54485e644
Author: Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Fri Feb 24 06:03:36 2017 +0100
Commit: Roberto E. Vargas Caballero <[email protected]>
CommitDate: Fri Feb 24 19:55:49 2017 +0100
[cc1] Add debug information to pushctx() and popctx()
This debug information is useful to understand how
the context stack is evoluting in the time.
diff --git a/cc1/symbol.c b/cc1/symbol.c
index 7cb8d6f..3d17c2b 100644
--- a/cc1/symbol.c
+++ b/cc1/symbol.c
@@ -97,6 +97,7 @@ unlinkhash(Symbol *sym)
void
pushctx(void)
{
+ DBG("SYM: pushed context %d", curctx+1);
if (++curctx == NR_BLOCK+1)
error("too many nested blocks");
}
@@ -131,6 +132,7 @@ popctx(void)
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