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);
25 /** start an include file */
26 void (*include_begin)(dbg_handle *handle, const char *filename);
28 /** end an include file */
29 void (*include_end)(dbg_handle *handle);
32 void (*main_program)(dbg_handle *handle);
34 /** dumps the stabs for a method begin */
35 void (*method_begin)(dbg_handle *handle, entity *ent, const be_stack_layout_t *layout);
37 /** dumps the stabs for a method end */
38 void (*method_end)(dbg_handle *handle);
40 /** dumps a line number */
41 void (*line)(dbg_handle *handle, unsigned lineno, const char *address);
44 void (*types)(dbg_handle *handle);
46 /** dump a variable in the global type */
47 void (*variable)(dbg_handle *h, struct obstack *obst, entity *ent);
51 /** The base class of all debug implementations. */
56 /** close a debug handler. */
57 void be_dbg_close(dbg_handle *handle);
59 /** start a new source object (compilation unit) */
60 void be_dbg_so(dbg_handle *handle, const char *filename);
62 /** start an include file */
63 void be_dbg_include_begin(dbg_handle *handle, const char *filename);
65 /** end an include file */
66 void be_dbg_include_end(dbg_handle *handle);
69 void be_dbg_main_program(dbg_handle *handle);
71 /** debug for a method begin */
72 void be_dbg_method_begin(dbg_handle *handle, entity *ent, const be_stack_layout_t *layout);
74 /** debug for a method end */
75 void be_dbg_method_end(dbg_handle *handle);
77 /** debug for line number */
78 void be_dbg_line(dbg_handle *handle, unsigned lineno, const char *address);
81 void be_dbg_types(dbg_handle *handle);
83 /** dump a variable in the global type */
84 void be_dbg_variable(dbg_handle *handle, struct obstack *obst, entity *ent);
86 /** Opens the NULL handler: no debug support. */
87 dbg_handle *be_nulldbg_open(void);
89 /** Opens a stabs handler. */
90 dbg_handle *be_stabs_open(FILE *out);
92 #endif /* __BE_DBGOUT_H__ */