libFirm 1.20
|
Firm requires a debugging module fulfilling this interface, else no debugging information is passed to the backend. More...
Typedefs | |
typedef void | merge_pair_func (ir_node *new_node, ir_node *old_node, dbg_action action) |
The type of the debug info merge function. | |
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) |
The type of the debug info merge sets function. | |
typedef const char *(* | retrieve_dbg_func )(const dbg_info *dbg, unsigned *line) |
The type of the debug info retriever function. | |
typedef void(* | retrieve_type_dbg_func )(char *buffer, size_t buffer_size, const type_dbg_info *tdbgi) |
The type of the type debug info retrieve function. | |
typedef struct dbg_info | dbg_info |
Source Reference. | |
typedef struct type_dbg_info | type_dbg_info |
Source Type Reference. | |
Enumerations | |
enum | dbg_action { dbg_error = 0, dbg_opt_ssa, dbg_opt_auxnode, dbg_const_eval, dbg_opt_cse, dbg_straightening, dbg_if_simplification, dbg_algebraic_simplification, dbg_write_after_write, dbg_write_after_read, dbg_read_after_write, dbg_read_after_read, dbg_read_a_const, dbg_rem_poly_call, dbg_dead_code, dbg_opt_confirm, dbg_gvn_pre, dbg_combo, dbg_jumpthreading, dbg_backend, dbg_max } |
An enumeration indicating the action performed by a transformation. More... | |
Functions | |
const char * | dbg_action_2_str (dbg_action a) |
Converts a debug_action into a string. | |
void | dbg_init (merge_pair_func *dbg_info_merge_pair, merge_sets_func *dbg_info_merge_sets) |
Initializes the debug support. | |
void | ir_set_debug_retrieve (retrieve_dbg_func func) |
Sets a debug info retriever. | |
void | ir_set_type_debug_retrieve (retrieve_type_dbg_func func) |
Sets global print_type_dbg_info function in firm. | |
const char * | ir_retrieve_dbg_info (const dbg_info *dbg, unsigned *line) |
Retrieve the debug info. | |
void | ir_retrieve_type_dbg_info (char *buffer, size_t buffer_size, const type_dbg_info *tdbgi) |
Retrieve type debug info. |
Firm requires a debugging module fulfilling this interface, else no debugging information is passed to the backend.
The interface requires a datatype representing the debugging information. Firm supports administrating a reference to the debug information in every Firm node. Further Firm optimizations call routines to propagate debug information from old nodes to new nodes if the optimization replaces the old ones by the new ones.
Source Reference.
An abstract data type containing information for debugging support.
This opaque data type is not defined anywhere in the Firm library, but pointers to this type can be stored in Firm nodes.
Definition at line 54 of file firm_types.h.
typedef void merge_pair_func(ir_node *new_node, ir_node *old_node, dbg_action action) |
The type of the debug info merge function.
new_node | the new ir node |
old_node | the old ir node |
action | the action that triggers the merge |
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) |
The type of the debug info merge sets function.
new_node_array | array of new nodes |
new_num_entries | number of entries in new_node_array |
old_node_array | array of old nodes |
old_num_entries | number of entries in old_node_array |
action | the action that triggers the merge |
typedef const char*(* retrieve_dbg_func)(const dbg_info *dbg, unsigned *line) |
typedef void(* retrieve_type_dbg_func)(char *buffer, size_t buffer_size, const type_dbg_info *tdbgi) |
typedef struct type_dbg_info type_dbg_info |
Source Type Reference.
Definition at line 57 of file firm_types.h.
enum dbg_action |
An enumeration indicating the action performed by a transformation.
const char* dbg_action_2_str | ( | dbg_action | a | ) |
Converts a debug_action into a string.
a | the debug action |
void dbg_init | ( | merge_pair_func * | dbg_info_merge_pair, |
merge_sets_func * | dbg_info_merge_sets | ||
) |
Initializes the debug support.
This function takes pointers to two functions that merge the debug information when a transformation of a Firm graph is performed. Firm transformations call one of these functions.
Further both functions pass an enumeration indicating the action performed by the transformation, e.g. the kind of optimization performed.
const char* ir_retrieve_dbg_info | ( | const dbg_info * | dbg, |
unsigned * | line | ||
) |
Retrieve the debug info.
void ir_retrieve_type_dbg_info | ( | char * | buffer, |
size_t | buffer_size, | ||
const type_dbg_info * | tdbgi | ||
) |
Retrieve type debug info.
void ir_set_debug_retrieve | ( | retrieve_dbg_func | func | ) |
Sets a debug info retriever.
func | the debug retriever function. |
void ir_set_type_debug_retrieve | ( | retrieve_type_dbg_func | func | ) |
Sets global print_type_dbg_info function in firm.