00001
00034 #ifndef YASM_DBGFMT_H
00035 #define YASM_DBGFMT_H
00036
00037 #ifndef YASM_DOXYGEN
00038
00041 typedef struct yasm_dbgfmt_base {
00043 const struct yasm_dbgfmt_module *module;
00044 } yasm_dbgfmt_base;
00045 #endif
00046
00048 struct yasm_dbgfmt_module {
00050 const char *name;
00051
00053 const char *keyword;
00054
00056 const yasm_directive *directives;
00057
00064 yasm_dbgfmt * (*create) (yasm_object *object);
00065
00069 void (*destroy) ( yasm_dbgfmt *dbgfmt);
00070
00074 void (*generate) (yasm_object *object, yasm_linemap *linemap,
00075 yasm_errwarns *errwarns);
00076 };
00077
00082 const char *yasm_dbgfmt_keyword(const yasm_dbgfmt *dbgfmt);
00083
00091 yasm_dbgfmt *yasm_dbgfmt_create
00092 (const yasm_dbgfmt_module *module, yasm_object *object);
00093
00097 void yasm_dbgfmt_destroy( yasm_dbgfmt *dbgfmt);
00098
00105 void yasm_dbgfmt_generate(yasm_object *object, yasm_linemap *linemap,
00106 yasm_errwarns *errwarns);
00107
00108 #ifndef YASM_DOXYGEN
00109
00110
00111
00112 #define yasm_dbgfmt_keyword(dbgfmt) \
00113 (((yasm_dbgfmt_base *)dbgfmt)->module->keyword)
00114
00115 #define yasm_dbgfmt_create(module, object) \
00116 module->create(object)
00117
00118 #define yasm_dbgfmt_destroy(dbgfmt) \
00119 ((yasm_dbgfmt_base *)dbgfmt)->module->destroy(dbgfmt)
00120 #define yasm_dbgfmt_generate(object, linemap, ews) \
00121 ((yasm_dbgfmt_base *)((object)->dbgfmt))->module->generate \
00122 (object, linemap, ews)
00123
00124 #endif
00125
00126 #endif