be_dbgout_t.h 2.04 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
 *
 * This file is part of libFirm.
 *
 * This file may be distributed and/or modified under the terms of the
 * GNU General Public License version 2 as published by the Free Software
 * Foundation and appearing in the file LICENSE.GPL included in the
 * packaging of this file.
 *
 * Licensees holding valid libFirm Professional Edition licenses may use
 * this file in accordance with the libFirm Commercial License.
 * Agreement provided with the Software.
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE.
 */

/**
 * @file
 * @brief   Debug output support.
 * @author  Michael Beck
 * @date    11.9.2006
 * @version $Id: be_dbgout.h 17143 2008-01-02 20:56:33Z beck $
 */
#ifndef FIRM_BE_BE_DBGOUT_T_H
#define FIRM_BE_BE_DBGOUT_T_H

#include "obst.h"
#include "firm_types.h"
32
#include "be_types.h"
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

typedef struct dbg_handle dbg_handle;

/**
 * Debug operations.
 */
typedef struct debug_ops {
	/** close the stabs handler. */
	void (*close)(dbg_handle *handle);

	/** start a new source object (compilation unit) */
	void (*so)(dbg_handle *handle, const char *filename);

	/** Main Program */
	void (*main_program)(dbg_handle *handle);

	/** dumps the stabs for a method begin */
	void (*method_begin)(dbg_handle *handle, ir_entity *ent, const be_stack_layout_t *layout);

	/** dumps the stabs for a method end */
	void (*method_end)(dbg_handle *handle);

	/** dump types */
	void (*types)(dbg_handle *handle);

	/** dump a variable in the global type */
59
	void (*variable)(dbg_handle *h, ir_entity *ent);
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

	/** notify debug info about position change */
	void (*set_dbg_info)(dbg_handle *h, dbg_info *dbgi);
} debug_ops;

/** The base class of all debug implementations. */
struct dbg_handle {
	const debug_ops *ops;
};

typedef dbg_handle* (*be_create_dbgout_module_func)(void);
void be_register_dbgout_module(const char *name,
                               be_create_dbgout_module_func func);

#endif