removed unitialized used vartiable
[libfirm] / ir / be / be_dbgout.h
1 /**
2  * @file
3  * @brief   Debug output support.
4  * @author  Michael Beck
5  * @date    11.9.2006
6  * @version $Id$
7  */
8 #ifndef __BE_DBGOUT_H__
9 #define __BE_DBGOUT_H__
10
11 #include "obst.h"
12 #include "beabi_t.h"
13
14 typedef struct dbg_handle dbg_handle;
15
16 /**
17  * Debug operations.
18  */
19 typedef struct debug_ops {
20         /** close the stabs handler. */
21         void (*close)(dbg_handle *handle);
22
23         /** start a new source object (compilation unit) */
24         void (*so)(dbg_handle *handle, const char *filename);
25
26         /** start an include file */
27         void (*include_begin)(dbg_handle *handle, const char *filename);
28
29         /** end an include file */
30         void (*include_end)(dbg_handle *handle);
31
32         /** Main Program */
33         void (*main_program)(dbg_handle *handle);
34
35         /** dumps the stabs for a method begin */
36         void (*method_begin)(dbg_handle *handle, ir_entity *ent, const be_stack_layout_t *layout);
37
38         /** dumps the stabs for a method end */
39         void (*method_end)(dbg_handle *handle);
40
41         /** dumps a line number */
42         void (*line)(dbg_handle *handle, unsigned lineno, const char *address);
43
44         /** dump types */
45         void (*types)(dbg_handle *handle);
46
47         /** dump a variable in the global type */
48         void (*variable)(dbg_handle *h, struct obstack *obst, ir_entity *ent);
49
50 } debug_ops;
51
52 /** The base class of all debug implementations. */
53 struct dbg_handle {
54         const debug_ops *ops;
55 };
56
57 /** close a debug handler. */
58 void be_dbg_close(dbg_handle *handle);
59
60 /** start a new source object (compilation unit) */
61 void be_dbg_so(dbg_handle *handle, const char *filename);
62
63 /** start an include file */
64 void be_dbg_include_begin(dbg_handle *handle, const char *filename);
65
66 /** end an include file */
67 void be_dbg_include_end(dbg_handle *handle);
68
69 /** Main program */
70 void be_dbg_main_program(dbg_handle *handle);
71
72 /** debug for a method begin */
73 void be_dbg_method_begin(dbg_handle *handle, ir_entity *ent, const be_stack_layout_t *layout);
74
75 /** debug for a method end */
76 void be_dbg_method_end(dbg_handle *handle);
77
78 /** debug for line number */
79 void be_dbg_line(dbg_handle *handle, unsigned lineno, const char *address);
80
81 /** dump types */
82 void be_dbg_types(dbg_handle *handle);
83
84 /** dump a variable in the global type */
85 void be_dbg_variable(dbg_handle *handle, struct obstack *obst, ir_entity *ent);
86
87 /** Opens the NULL handler: no debug support. */
88 dbg_handle *be_nulldbg_open(void);
89
90 /** Opens a stabs handler. */
91 dbg_handle *be_stabs_open(FILE *out);
92
93 #endif /* __BE_DBGOUT_H__ */