libyasm
dbgfmt.h
Go to the documentation of this file.
1 
30 #ifndef YASM_DBGFMT_H
31 #define YASM_DBGFMT_H
32 
33 #ifndef YASM_DOXYGEN
34 
37 typedef struct yasm_dbgfmt_base {
39  const struct yasm_dbgfmt_module *module;
40 } yasm_dbgfmt_base;
41 #endif
42 
46  const char *name;
47 
49  const char *keyword;
50 
52  /*@null@*/ const yasm_directive *directives;
53 
60  /*@null@*/ /*@only@*/ yasm_dbgfmt * (*create) (yasm_object *object);
61 
65  void (*destroy) (/*@only@*/ yasm_dbgfmt *dbgfmt);
66 
70  void (*generate) (yasm_object *object, yasm_linemap *linemap,
71  yasm_errwarns *errwarns);
72 };
73 
78 const char *yasm_dbgfmt_keyword(const yasm_dbgfmt *dbgfmt);
79 
87 /*@null@*/ /*@only@*/ yasm_dbgfmt *yasm_dbgfmt_create
88  (const yasm_dbgfmt_module *module, yasm_object *object);
89 
93 void yasm_dbgfmt_destroy(/*@only@*/ yasm_dbgfmt *dbgfmt);
94 
101 void yasm_dbgfmt_generate(yasm_object *object, yasm_linemap *linemap,
102  yasm_errwarns *errwarns);
103 
104 #ifndef YASM_DOXYGEN
105 
106 /* Inline macro implementations for dbgfmt functions */
107 
108 #define yasm_dbgfmt_keyword(dbgfmt) \
109  (((yasm_dbgfmt_base *)dbgfmt)->module->keyword)
110 
111 #define yasm_dbgfmt_create(module, object) \
112  module->create(object)
113 
114 #define yasm_dbgfmt_destroy(dbgfmt) \
115  ((yasm_dbgfmt_base *)dbgfmt)->module->destroy(dbgfmt)
116 #define yasm_dbgfmt_generate(object, linemap, ews) \
117  ((yasm_dbgfmt_base *)((object)->dbgfmt))->module->generate \
118  (object, linemap, ews)
119 
120 #endif
121 
122 #endif