Mercurial > hg-old > index.cgi
comparison lwasm/lwasm.h @ 372:90de73ba0cac
Created a useful debug framework and adjusted lw_expr_print() to return a "static" dynamic string
author | lost@starbug |
---|---|
date | Thu, 22 Apr 2010 18:19:06 -0600 |
parents | 34dfc9747f23 |
children | d99322ef6f21 |
comparison
equal
deleted
inserted
replaced
371:9c24d9d485b9 | 372:90de73ba0cac |
---|---|
183 struct asmstate_s | 183 struct asmstate_s |
184 { | 184 { |
185 int output_format; // output format | 185 int output_format; // output format |
186 int target; // assembly target | 186 int target; // assembly target |
187 int debug_level; // level of debugging requested | 187 int debug_level; // level of debugging requested |
188 FILE *debug_file; // FILE * to output debug messages to | |
188 int flags; // assembly flags | 189 int flags; // assembly flags |
189 int pragmas; // pragmas currently in effect | 190 int pragmas; // pragmas currently in effect |
190 int errorcount; // number of errors encountered | 191 int errorcount; // number of errors encountered |
191 int inmacro; // are we in a macro? | 192 int inmacro; // are we in a macro? |
192 int skipcond; // skipping a condition? | 193 int skipcond; // skipping a condition? |
248 | 249 |
249 extern void lwasm_show_errors(asmstate_t *as); | 250 extern void lwasm_show_errors(asmstate_t *as); |
250 | 251 |
251 extern int lwasm_reduce_expr(asmstate_t *as, lw_expr_t expr); | 252 extern int lwasm_reduce_expr(asmstate_t *as, lw_expr_t expr); |
252 | 253 |
254 extern void debug_message(asmstate_t *as, int level, const char *fmt, ...); | |
255 extern void dump_state(asmstate_t *as); | |
256 | |
257 | |
253 #endif | 258 #endif |
254 | 259 |
255 #define OPLEN(op) (((op)>0xFF)?2:1) | 260 #define OPLEN(op) (((op)>0xFF)?2:1) |
256 #define CURPRAGMA(l,p) (((l)->pragmas & (p)) ? 1 : 0) | 261 #define CURPRAGMA(l,p) (((l)->pragmas & (p)) ? 1 : 0) |
257 | 262 |