X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=debug.c;h=6ce006501c94f294512ce5d375ca59ce20401a07;hp=e3f947a3c185037f59cb8a0f423ed1732be99b2e;hb=d16b8ea0ee65b2ad901ca6b0624c07e6e4930cc4;hpb=49cce96fba11282e4244187f15be418d5ae5bb8d diff --git a/debug.c b/debug.c index e3f947a..6ce0065 100644 --- a/debug.c +++ b/debug.c @@ -7,11 +7,14 @@ // #include "debug.h" -#include "sect.h" #include "amode.h" +#include "direct.h" #include "mark.h" +#include "sect.h" +#include "token.h" + -static int siztab[4] = {3, 5, 9, 9}; +static int siztab[4] = { 3, 5, 9, 9 }; // @@ -40,8 +43,9 @@ TOKEN * printexpr(TOKEN * tp) switch ((int)*tp++) { case SYMBOL: - printf("`%s' ", ((SYM *)*tp)->sname); - ++tp; +// printf("`%s' ", ((SYM *)*tp)->sname); + printf("`%s' ", symbolPtr[*tp]->sname); + tp++; break; case CONST: printf("$%ux ", *tp++); @@ -94,7 +98,7 @@ int fudump(CHUNK * ch) p.cp = ch->chptr; ep = ch->chptr + ch->ch_size; - while(p.cp < ep) + while (p.cp < ep) { attr = *p.wp++; loc = *p.lp++; @@ -112,7 +116,7 @@ int fudump(CHUNK * ch) else { printf("`%s' ;\n", (*p.sy)->sname); - ++p.lp; + p.sy++; } } @@ -278,10 +282,12 @@ int dumptok(TOKEN * tk) printf("CONST=%ud", *tk++); break; case STRING: // STRING
- printf("STRING='%s'", (char *)*tk++); +// printf("STRING='%s'", (char *)*tk++); + printf("STRING='%s'", string[*tk++]); break; case SYMBOL: // SYMBOL
- printf("SYMBOL='%s'", (char *)*tk++); +// printf("SYMBOL='%s'", (char *)*tk++); + printf("SYMBOL='%s'", string[*tk++]); break; case EOL: // End of line printf("EOL"); @@ -329,7 +335,7 @@ int dump_everything(void) { int i; - for(i = 1; i < NSECTS; ++i) + for(i=1; i