3 * @brief Debug output support.
8 #ifndef __BE_DBGOUT_H__
9 #define __BE_DBGOUT_H__
14 typedef struct dbg_handle dbg_handle;
19 typedef struct debug_ops {
20 /** close the stabs handler. */
21 void (*close)(dbg_handle *handle);
23 /** start a new source object (compilation unit) */
24 void (*so)(dbg_handle *handle, const char *filename);
26 /** start an include file */
27 void (*include_begin)(dbg_handle *handle, const char *filename);
29 /** end an include file */
30 void (*include_end)(dbg_handle *handle);
33 void (*main_program)(dbg_handle *handle);
35 /** dumps the stabs for a method begin */
36 void (*method_begin)(dbg_handle *handle, ir_entity *ent, const be_stack_layout_t *layout);
38 /** dumps the stabs for a method end */
39 void (*method_end)(dbg_handle *handle);
41 /** dumps a line number */
42 void (*line)(dbg_handle *handle, unsigned lineno, const char *address);
45 void (*types)(dbg_handle *handle);
47 /** dump a variable in the global type */
48 void (*variable)(dbg_handle *h, struct obstack *obst, ir_entity *ent);
52 /** The base class of all debug implementations. */
57 /** close a debug handler. */
58 void be_dbg_close(dbg_handle *handle);
60 /** start a new source object (compilation unit) */
61 void be_dbg_so(dbg_handle *handle, const char *filename);
63 /** start an include file */
64 void be_dbg_include_begin(dbg_handle *handle, const char *filename);
66 /** end an include file */
67 void be_dbg_include_end(dbg_handle *handle);
70 void be_dbg_main_program(dbg_handle *handle);
72 /** debug for a method begin */
73 void be_dbg_method_begin(dbg_handle *handle, ir_entity *ent, const be_stack_layout_t *layout);
75 /** debug for a method end */
76 void be_dbg_method_end(dbg_handle *handle);
78 /** debug for line number */
79 void be_dbg_line(dbg_handle *handle, unsigned lineno, const char *address);
82 void be_dbg_types(dbg_handle *handle);
84 /** dump a variable in the global type */
85 void be_dbg_variable(dbg_handle *handle, struct obstack *obst, ir_entity *ent);
87 /** Opens the NULL handler: no debug support. */
88 dbg_handle *be_nulldbg_open(void);
90 /** Opens a stabs handler. */
91 dbg_handle *be_stabs_open(FILE *out);
93 #endif /* __BE_DBGOUT_H__ */