libFirm
|
Firm requires a debugging module fulfilling this interface, else no debugging information is passed to the backend. More...
Data Structures | |
struct | src_loc_t |
A sourcecode location. 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. More... | |
typedef void | merge_sets_func(ir_node *const *new_node_array, int new_num_entries, ir_node *const *old_node_array, int old_num_entries, dbg_action action) |
The type of the debug info merge sets function. More... | |
typedef src_loc_t(* | retrieve_dbg_func) (dbg_info const *dbg) |
The type of the debug info retriever function. More... | |
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. More... | |
typedef struct dbg_info | dbg_info |
Source Reference. More... | |
typedef struct type_dbg_info | type_dbg_info |
Source Type Reference. More... | |
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_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. More... | |
void | dbg_init (merge_pair_func *dbg_info_merge_pair, merge_sets_func *dbg_info_merge_sets) |
Initializes the debug support. More... | |
void | ir_set_debug_retrieve (retrieve_dbg_func func) |
Sets a debug info retriever. More... | |
void | ir_set_type_debug_retrieve (retrieve_type_dbg_func func) |
Sets global print_type_dbg_info function in firm. More... | |
src_loc_t | ir_retrieve_dbg_info (dbg_info const *dbg) |
Retrieve the debug info. More... | |
void | ir_retrieve_type_dbg_info (char *buffer, size_t buffer_size, const type_dbg_info *tdbgi) |
Retrieve type debug info. More... | |
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.
struct src_loc_t |
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 40 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 *const *new_node_array, int new_num_entries, ir_node *const *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 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 43 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.
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.