shithub: scc

Download patch

ref: bb62eb750a4a55634e242500fdb955278723805e
parent: 2181f5b6f64769cc57b8a9872d5f89f0493eb5d0
author: Roberto E. Vargas Caballero <[email protected]>
date: Sun Sep 27 06:22:47 EDT 2015

Add better debug output in dumpstab

--- a/cc1/symbol.c
+++ b/cc1/symbol.c
@@ -29,15 +29,15 @@
 			continue;
 		fprintf(stderr, "%d", (int) (bp - htab));
 		for (sym = *bp; sym; sym = sym->hash)
-			fprintf(stderr, "->[%d,%d:%s]",
-			        sym->ns, sym->ctx, sym->name);
+			fprintf(stderr, "->[%d,%d:'%s'=%p]",
+			        sym->ns, sym->ctx, sym->name, (void *) sym);
 		putc('\n', stderr);
 	}
 	fputs("head:", stderr);
 	for (sym = head; sym; sym = sym->next) {
-		fprintf(stderr, "->[%d,%d:'%s']",
+		fprintf(stderr, "->[%d,%d:'%s'=%p]",
 		        sym->ns, sym->ctx,
-		        (sym->name) ? sym->name : "");
+		        (sym->name) ? sym->name : "", (void *) sym);
 	}
 	putc('\n', stderr);
 }