1 #ifndef __BE_DBGOUT_H__
2 #define __BE_DBGOUT_H__
4 * Debug output support.
13 typedef struct dbg_handle dbg_handle;
18 typedef struct debug_ops {
19 /** close the stabs handler. */
20 void (*close)(dbg_handle *handle);
22 /** start a new source object (compilation unit) */
23 void (*so)(dbg_handle *handle, const char *filename);
26 void (*main_program)(dbg_handle *handle);
28 /** dumps the stabs for a method begin */
29 void (*method_begin)(dbg_handle *handle, entity *ent, const be_stack_layout_t *layout);
31 /** dumps the stabs for a method end */
32 void (*method_end)(dbg_handle *handle);
34 /** dumps a line number */
35 void (*line)(dbg_handle *handle, unsigned lineno, const char *address);
38 void (*types)(dbg_handle *handle);
41 void (*global)(dbg_handle *h, struct obstack *obst, entity *ent);
45 /** The base class of all debug implementations. */
50 /** close a debug handler. */
51 void be_dbg_close(dbg_handle *handle);
53 /** start a new source object (compilation unit) */
54 void be_dbg_so(dbg_handle *handle, const char *filename);
57 void be_dbg_main_program(dbg_handle *handle);
59 /** debug for a method begin */
60 void be_dbg_method_begin(dbg_handle *handle, entity *ent, const be_stack_layout_t *layout);
62 /** debug for a method end */
63 void be_dbg_method_end(dbg_handle *handle);
65 /** debug for line number */
66 void be_dbg_line(dbg_handle *handle, unsigned lineno, const char *address);
69 void be_dbg_types(dbg_handle *handle);
72 void be_dbg_global(dbg_handle *handle, struct obstack *obst, entity *ent);
74 /** Opens the NULL handler: no debug support. */
75 dbg_handle *be_nulldbg_open(void);
77 /** Opens a stabs handler. */
78 dbg_handle *be_stabs_open(FILE *out);
80 #endif /* __BE_DBGOUT_H__ */