change pn_XXX_max enum to really be the maximum pn and not maximum+1, add n_XXX_max...
[libfirm] / ir / be / be_dbgout_t.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   Debug output support.
23  * @author  Michael Beck
24  * @date    11.9.2006
25  * @version $Id: be_dbgout.h 17143 2008-01-02 20:56:33Z beck $
26  */
27 #ifndef FIRM_BE_BE_DBGOUT_T_H
28 #define FIRM_BE_BE_DBGOUT_T_H
29
30 #include "be_dbgout.h"
31 #include "obst.h"
32 #include "firm_types.h"
33 #include "be_types.h"
34
35 typedef struct dbg_handle dbg_handle;
36
37 /**
38  * Debug operations.
39  */
40 typedef struct debug_ops {
41         /** close the stabs handler. */
42         void (*close)(dbg_handle *handle);
43
44         /** start a compilation unit */
45         void (*unit_begin)(dbg_handle *handle, const char *filename);
46
47         /** end compilation unit */
48         void (*unit_end)(dbg_handle *handle);
49
50         /** dumps the stabs for a method begin */
51         void (*method_begin)(dbg_handle *handle, const ir_entity *ent);
52
53         /** dumps the stabs for a method end */
54         void (*method_end)(dbg_handle *handle);
55
56         /** dump types */
57         void (*types)(dbg_handle *handle);
58
59         /** dump a variable in the global type */
60         void (*variable)(dbg_handle *h, const ir_entity *ent);
61
62         /** notify debug info about position change */
63         void (*set_dbg_info)(dbg_handle *h, dbg_info *dbgi);
64 } debug_ops;
65
66 /** The base class of all debug implementations. */
67 struct dbg_handle {
68         const debug_ops *ops;
69 };
70
71 typedef dbg_handle* (*be_create_dbgout_module_func)(void);
72 void be_register_dbgout_module(const char *name,
73                                be_create_dbgout_module_func func);
74
75 #endif