|
libyasm
|
00001 00030 #ifndef YASM_DBGFMT_H 00031 #define YASM_DBGFMT_H 00032 00033 #ifndef YASM_DOXYGEN 00034 00037 typedef struct yasm_dbgfmt_base { 00039 const struct yasm_dbgfmt_module *module; 00040 } yasm_dbgfmt_base; 00041 #endif 00042 00044 struct yasm_dbgfmt_module { 00046 const char *name; 00047 00049 const char *keyword; 00050 00052 /*@null@*/ const yasm_directive *directives; 00053 00060 /*@null@*/ /*@only@*/ yasm_dbgfmt * (*create) (yasm_object *object); 00061 00065 void (*destroy) (/*@only@*/ yasm_dbgfmt *dbgfmt); 00066 00070 void (*generate) (yasm_object *object, yasm_linemap *linemap, 00071 yasm_errwarns *errwarns); 00072 }; 00073 00078 const char *yasm_dbgfmt_keyword(const yasm_dbgfmt *dbgfmt); 00079 00087 /*@null@*/ /*@only@*/ yasm_dbgfmt *yasm_dbgfmt_create 00088 (const yasm_dbgfmt_module *module, yasm_object *object); 00089 00093 void yasm_dbgfmt_destroy(/*@only@*/ yasm_dbgfmt *dbgfmt); 00094 00101 void yasm_dbgfmt_generate(yasm_object *object, yasm_linemap *linemap, 00102 yasm_errwarns *errwarns); 00103 00104 #ifndef YASM_DOXYGEN 00105 00106 /* Inline macro implementations for dbgfmt functions */ 00107 00108 #define yasm_dbgfmt_keyword(dbgfmt) \ 00109 (((yasm_dbgfmt_base *)dbgfmt)->module->keyword) 00110 00111 #define yasm_dbgfmt_create(module, object) \ 00112 module->create(object) 00113 00114 #define yasm_dbgfmt_destroy(dbgfmt) \ 00115 ((yasm_dbgfmt_base *)dbgfmt)->module->destroy(dbgfmt) 00116 #define yasm_dbgfmt_generate(object, linemap, ews) \ 00117 ((yasm_dbgfmt_base *)((object)->dbgfmt))->module->generate \ 00118 (object, linemap, ews) 00119 00120 #endif 00121 00122 #endif
1.7.3