shithub: scc

Download patch

ref: 96318574d434d66a7ea8b3b5ebefb773f4b6cb3d
parent: 2e7e4ca6b9def1b7bae6b93285f6431039f9656a
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Mar 22 07:15:33 EDT 2022

cc1: Increase macro expansion debug output

This new output shows when the symbols are hided
and when they are unhided.

--- a/src/cmd/cc/cc1/lex.c
+++ b/src/cmd/cc/cc1/lex.c
@@ -55,6 +55,7 @@
 		fp = NULL;
 		if (hide->hide == UCHAR_MAX)
 			die("cc1: too many macro expansions");
+		DBG("SYM: hidding symbol %s %d\n", hide->name, hide->hide);
 		++hide->hide;
 		flags = IMACRO;
 	} else  if (fname) {
@@ -115,6 +116,7 @@
 		break;
 	case IMACRO:
 		assert(hide->hide == 1);
+		DBG("SYM: unhidding symbol %s %d\n", hide->name, hide->hide);
 		--hide->hide;
 		break;
 	}