bearch: Dump the output requirement and the assigned register in the same line for...
[libfirm] / ir / debug / dbginfo_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      Implements the Firm interface to debug information -- private header.
23  * @author     Goetz Lindenmaier
24  * @date       2001
25  * @brief
26  *  dbginfo: This is a empty implementation of the Firm interface to
27  *  debugging support.  It only guarantees that the Firm library compiles
28  *  and runs without any real debugging support.
29  */
30 #ifndef FIRM_DEBUG_DBGINFO_T_H
31 #define FIRM_DEBUG_DBGINFO_T_H
32
33 #include <stdlib.h>
34 #include "dbginfo.h"
35
36 /**
37  * The default merge_pair_func implementation, simply copies the debug info
38  * from the old Firm node to the new one if the new one does not have debug info yet.
39  *
40  * @param nw    The new Firm node.
41  * @param old   The old Firm node.
42  * @param info  The action that cause old node to be replaced by new one.
43  */
44 void default_dbg_info_merge_pair(ir_node *nw, ir_node *old, dbg_action info);
45
46 /**
47  * The default merge_sets_func implementation.  If n_old_nodes is equal 1,
48  * copies the debug info from the old node to all new ones (if they do not have
49  * one), else does nothing.
50  *
51  * @param new_nodes     An array of new Firm nodes.
52  * @param n_new_nodes   The length of the new_nodes array.
53  * @param old_nodes     An array of old (replaced) Firm nodes.
54  * @param n_old_nodes   The length of the old_nodes array.
55  * @param info          The action that cause old node to be replaced by new one.
56  */
57 void default_dbg_info_merge_sets(ir_node **new_nodes, int n_new_nodes,
58                             ir_node **old_nodes, int n_old_nodes,
59                             dbg_action info);
60
61 /**
62  * The current merge_pair_func(), access only from inside firm.
63  */
64 extern merge_pair_func *__dbg_info_merge_pair;
65
66 /**
67  * The current merge_sets_func(), access only from inside firm.
68  */
69 extern merge_sets_func *__dbg_info_merge_sets;
70
71 void ir_dbg_info_snprint(char *buf, size_t buf_size, const dbg_info *dbg);
72
73 #endif