2 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
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.
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.
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
22 * @brief Debug output support.
23 * @author Michael Beck
25 * @version $Id: be_dbgout.h 17143 2008-01-02 20:56:33Z beck $
27 #ifndef FIRM_BE_BE_DBGOUT_T_H
28 #define FIRM_BE_BE_DBGOUT_T_H
32 #include "firm_types.h"
34 typedef struct dbg_handle dbg_handle;
39 typedef struct debug_ops {
40 /** close the stabs handler. */
41 void (*close)(dbg_handle *handle);
43 /** start a new source object (compilation unit) */
44 void (*so)(dbg_handle *handle, const char *filename);
47 void (*main_program)(dbg_handle *handle);
49 /** dumps the stabs for a method begin */
50 void (*method_begin)(dbg_handle *handle, ir_entity *ent, const be_stack_layout_t *layout);
52 /** dumps the stabs for a method end */
53 void (*method_end)(dbg_handle *handle);
56 void (*types)(dbg_handle *handle);
58 /** dump a variable in the global type */
59 void (*variable)(dbg_handle *h, ir_entity *ent);
61 /** notify debug info about position change */
62 void (*set_dbg_info)(dbg_handle *h, dbg_info *dbgi);
65 /** The base class of all debug implementations. */
70 typedef dbg_handle* (*be_create_dbgout_module_func)(void);
71 void be_register_dbgout_module(const char *name,
72 be_create_dbgout_module_func func);