renamed some firm enum types to have the ir_ prefix
[libfirm] / ir / be / be_dbgout.h
1 #ifndef __BE_DBGOUT_H__
2 #define __BE_DBGOUT_H__
3 /**
4  * Debug output support.
5  *
6  * @author Michael Beck
7  * @date   11.9.2006
8  * @cvsid  $Id$
9  */
10 #include "obst.h"
11 #include "beabi_t.h"
12
13 typedef struct dbg_handle dbg_handle;
14
15 /**
16  * Debug operations.
17  */
18 typedef struct debug_ops {
19         /** close the stabs handler. */
20         void (*close)(dbg_handle *handle);
21
22         /** start a new source object (compilation unit) */
23         void (*so)(dbg_handle *handle, const char *filename);
24
25         /** Main Program */
26         void (*main_program)(dbg_handle *handle);
27
28         /** dumps the stabs for a function */
29         void (*method)(dbg_handle *handle, entity *ent, const be_stack_layout_t *layout);
30
31         /** dumps a line number */
32         void (*line)(dbg_handle *handle, unsigned lineno, const char *address);
33
34         /** dump types */
35         void (*types)(dbg_handle *handle);
36
37         /** dump a global */
38         void (*global)(dbg_handle *h, struct obstack *obst, entity *ent);
39
40 } debug_ops;
41
42 /** The base class of all debug implementations. */
43 struct dbg_handle {
44         const debug_ops *ops;
45 };
46
47 /** close a debug handler. */
48 void be_dbg_close(dbg_handle *handle);
49
50 /** start a new source object (compilation unit) */
51 void be_dbg_so(dbg_handle *handle, const char *filename);
52
53 /** Main program */
54 void be_dbg_main_program(dbg_handle *handle);
55
56 /** debug for a function */
57 void be_dbg_method(dbg_handle *handle, entity *ent, const be_stack_layout_t *layout);
58
59 /** debug for line number */
60 void be_dbg_line(dbg_handle *handle, unsigned lineno, const char *address);
61
62 /** dump types */
63 void be_dbg_types(dbg_handle *handle);
64
65 /** dump a global */
66 void be_dbg_global(dbg_handle *handle, struct obstack *obst, entity *ent);
67
68 /** Opens a stabs handler. */
69 dbg_handle *be_stabs_open(FILE *out);
70
71 #endif /* __BE_DBGOUT_H__ */