libFirm 1.20
|
00001 /* 00002 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. 00003 * 00004 * This file is part of libFirm. 00005 * 00006 * This file may be distributed and/or modified under the terms of the 00007 * GNU General Public License version 2 as published by the Free Software 00008 * Foundation and appearing in the file LICENSE.GPL included in the 00009 * packaging of this file. 00010 * 00011 * Licensees holding valid libFirm Professional Edition licenses may use 00012 * this file in accordance with the libFirm Commercial License. 00013 * Agreement provided with the Software. 00014 * 00015 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00016 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00017 * PURPOSE. 00018 */ 00019 00026 #ifndef FIRM_DEBUG_DBGINFO_H 00027 #define FIRM_DEBUG_DBGINFO_H 00028 00029 #include <stdlib.h> 00030 #include "firm_types.h" 00031 #include "ident.h" 00032 #include "begin.h" 00033 00059 typedef enum { 00060 dbg_error = 0, 00061 dbg_opt_ssa, 00062 dbg_opt_auxnode, 00063 dbg_const_eval, 00064 dbg_opt_cse, 00065 dbg_straightening, 00066 dbg_if_simplification, 00068 dbg_algebraic_simplification, 00070 dbg_write_after_write, 00072 dbg_write_after_read, 00074 dbg_read_after_write, 00076 dbg_read_after_read, 00078 dbg_read_a_const, 00080 dbg_rem_poly_call, 00081 dbg_dead_code, 00082 dbg_opt_confirm, 00083 dbg_gvn_pre, 00084 dbg_combo, 00085 dbg_jumpthreading, 00086 dbg_backend, 00087 dbg_max 00088 } dbg_action; 00089 00095 FIRM_API const char *dbg_action_2_str(dbg_action a); 00096 00106 typedef void merge_pair_func(ir_node *new_node, ir_node *old_node, dbg_action action); 00107 00119 typedef void merge_sets_func(ir_node **new_node_array, int new_num_entries, ir_node **old_node_array, int old_num_entries, dbg_action action); 00120 00144 FIRM_API void dbg_init(merge_pair_func *dbg_info_merge_pair, 00145 merge_sets_func *dbg_info_merge_sets); 00146 00153 typedef const char *(*retrieve_dbg_func)(const dbg_info *dbg, unsigned *line); 00154 00160 FIRM_API void ir_set_debug_retrieve(retrieve_dbg_func func); 00161 00167 typedef void (*retrieve_type_dbg_func)(char *buffer, size_t buffer_size, 00168 const type_dbg_info *tdbgi); 00169 00173 FIRM_API void ir_set_type_debug_retrieve(retrieve_type_dbg_func func); 00174 00178 FIRM_API const char *ir_retrieve_dbg_info(const dbg_info *dbg, unsigned *line); 00179 00183 FIRM_API void ir_retrieve_type_dbg_info(char *buffer, size_t buffer_size, 00184 const type_dbg_info *tdbgi); 00185 00188 #include "end.h" 00189 00190 #endif