scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit bb62eb750a4a55634e242500fdb955278723805e
parent 2181f5b6f64769cc57b8a9872d5f89f0493eb5d0
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 27 Sep 2015 10:22:47 +0200

Add better debug output in dumpstab

Diffstat:
Mcc1/symbol.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cc1/symbol.c b/cc1/symbol.c @@ -29,15 +29,15 @@ dumpstab(char *msg) 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); }