Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_util.h>
Go to the source code of this file.
Enumerations | |
enum | { WHITE_COLOR = 0 , GRAY_COLOR , BLACK_COLOR } |
|
static |
Definition at line 43 of file graph.c.
References rz_graph_visitor_t::back_edge, BLACK_COLOR, color, rz_graph_visitor_t::discover_node, rz_graph_visitor_t::fcross_edge, rz_graph_visitor_t::finish_node, free(), rz_graph_edge_t::from, from, g, GRAY_COLOR, i, rz_graph_node_t::idx, rz_graph_node_t::in_nodes, n, rz_graph_edge_t::nth, NULL, rz_graph_node_t::out_nodes, RZ_NEW, RZ_NEW0, rz_stack_free(), rz_stack_is_empty(), rz_stack_new(), rz_stack_pop(), rz_stack_push(), s, rz_graph_edge_t::to, rz_graph_visitor_t::tree_edge, v, and WHITE_COLOR.
Referenced by rz_graph_dfs(), rz_graph_dfs_node(), and rz_graph_dfs_node_reverse().
|
static |
Definition at line 38 of file graph.c.
References b, and setup::idx.
Referenced by rz_graph_get_node(), and rz_graph_node_iter().
RZ_API void rz_graph_add_edge | ( | RzGraph * | t, |
RzGraphNode * | from, | ||
RzGraphNode * | to | ||
) |
Definition at line 199 of file graph.c.
References from, rz_graph_add_edge_at(), and to.
Referenced by add_single_addr_xrefs(), create_dummy_nodes(), dot_trace_discover_child(), rz_agraph_add_edge(), and rz_analysis_class_get_inheritance_graph().
RZ_API void rz_graph_add_edge_at | ( | RzGraph * | t, |
RzGraphNode * | from, | ||
RzGraphNode * | to, | ||
int | nth | ||
) |
Definition at line 203 of file graph.c.
References from, rz_graph_t::n_edges, rz_list_append(), rz_list_insert(), and to.
Referenced by rz_agraph_add_edge_at(), and rz_graph_add_edge().
RZ_API RzGraphNode* rz_graph_add_node | ( | RzGraph * | t, |
void * | data | ||
) |
Definition at line 153 of file graph.c.
References rz_graph_t::last_index, n, rz_graph_t::n_nodes, rz_graph_t::nodes, NULL, rz_graph_node_new(), and rz_list_append().
Referenced by get_graphtrace_node(), rz_agraph_add_node_with_color(), rz_graph_add_nodef(), and rz_graph_node_split_forward().
RZ_API RzGraphNode* rz_graph_add_nodef | ( | RzGraph * | graph, |
void * | data, | ||
RzListFree | user_free | ||
) |
Definition at line 167 of file graph.c.
References rz_graph_node_t::free, and rz_graph_add_node().
Referenced by rz_graph_add_node_info().
RZ_API bool rz_graph_adjacent | ( | const RzGraph * | g, |
const RzGraphNode * | from, | ||
const RzGraphNode * | to | ||
) |
Definition at line 270 of file graph.c.
References from, g, rz_list_contains(), and to.
Referenced by dot_trace_discover_child(), and rz_graph_del_edge().
RZ_API void rz_graph_del_edge | ( | RzGraph * | t, |
RzGraphNode * | from, | ||
RzGraphNode * | to | ||
) |
Definition at line 232 of file graph.c.
References from, rz_graph_t::n_edges, rz_graph_adjacent(), rz_list_delete_data(), and to.
Referenced by rz_agraph_del_edge().
RZ_API void rz_graph_del_node | ( | RzGraph * | t, |
RzGraphNode * | n | ||
) |
Definition at line 177 of file graph.c.
References rz_graph_node_t::all_neighbours, rz_graph_node_t::in_nodes, n, rz_graph_t::n_edges, rz_graph_t::n_nodes, rz_graph_t::nodes, rz_graph_node_t::out_nodes, and rz_list_delete_data().
Referenced by fix_back_edge_dummy_nodes(), and rz_agraph_del_node().
RZ_API void rz_graph_dfs | ( | RzGraph * | g, |
RzGraphVisitor * | vis | ||
) |
Definition at line 299 of file graph.c.
References color, dfs_node(), free(), g, n, RZ_NEWS0, rz_return_if_fail, and WHITE_COLOR.
Referenced by assign_layers(), create_dummy_nodes(), and remove_cycles().
RZ_API void rz_graph_dfs_node | ( | RzGraph * | g, |
RzGraphNode * | n, | ||
RzGraphVisitor * | vis | ||
) |
RZ_API void rz_graph_dfs_node_reverse | ( | RzGraph * | g, |
RzGraphNode * | n, | ||
RzGraphVisitor * | vis | ||
) |
Definition at line 124 of file graph.c.
References free(), rz_graph_t::nodes, and rz_list_free().
Referenced by cmd_analysis_graph(), dot_trace_traverse(), rz_agraph_free(), rz_analysis_class_get_inheritance_graph(), rz_analysis_class_graph_handler(), and rz_graph_new().
Definition at line 245 of file graph.c.
Referenced by agraph_print_edges(), backedge_info(), collect_changes(), dot_trace_traverse(), fix_back_edge_dummy_nodes(), get_crossing_matrix(), get_edge_number(), place_single(), update_graph_sizes(), and user_edge_cb().
Definition at line 129 of file graph.c.
References rz_list_iter_t::data, setup::idx, node_cmp(), rz_graph_t::nodes, NULL, and rz_list_find().
Definition at line 265 of file graph.c.
Referenced by agraph_print_edges(), agraph_print_edges_simple(), agraph_print_nodes(), agraph_set_layout(), compute_classes(), create_layers(), dot_trace_traverse(), find_near_of(), fold_asm_trace(), place_dummies(), place_original(), rz_agraph_get_first_node(), update_graph_sizes(), and update_node_dimension().
Definition at line 256 of file graph.c.
Referenced by adjust_directions(), assign_layers(), backedge_info(), collect_changes(), get_edge_number(), place_single(), rz_agraph_del_node(), and update_graph_sizes().
Definition at line 108 of file graph.c.
References rz_list_t::free, rz_graph_t::last_index, rz_graph_t::n_nodes, rz_graph_t::nodes, NULL, rz_graph_free(), rz_graph_node_free(), rz_list_new(), and RZ_NEW0.
Referenced by agraph_init(), dot_trace_traverse(), rz_analysis_class_get_inheritance_graph(), rz_core_analysis_codexrefs(), and rz_core_analysis_importxrefs().
|
static |
Definition at line 25 of file graph.c.
References free(), n, and rz_list_free().
Referenced by rz_graph_new(), and rz_graph_reset().
Definition at line 137 of file graph.c.
References setup::idx, node_cmp(), rz_graph_t::nodes, and rz_list_find().
|
static |
Definition at line 13 of file graph.c.
References NULL, p, rz_list_new(), and RZ_NEW0.
Referenced by rz_graph_add_node().
RZ_API RzGraphNode* rz_graph_node_split_forward | ( | RzGraph * | g, |
RzGraphNode * | split_me, | ||
void * | data | ||
) |
Definition at line 214 of file graph.c.
References rz_graph_node_t::all_neighbours, g, n, rz_graph_node_t::out_nodes, rz_graph_add_node(), rz_list_append(), rz_list_delete_data(), and autogen_x86imm::tmp.
RZ_API RzGraphNode* rz_graph_nth_neighbour | ( | const RzGraph * | g, |
const RzGraphNode * | n, | ||
int | nth | ||
) |
Definition at line 251 of file graph.c.
References n, NULL, and rz_list_get_n().
Referenced by adjust_directions(), compute_vertical_nodes(), and follow_nth().
Definition at line 141 of file graph.c.
References rz_list_t::free, rz_graph_t::last_index, rz_graph_t::n_edges, rz_graph_t::n_nodes, rz_graph_t::nodes, rz_graph_node_free(), rz_list_free(), and rz_list_new().
Referenced by rz_agraph_reset().