diff options
Diffstat (limited to 'src/gtkext/graph/layout.c')
-rw-r--r-- | src/gtkext/graph/layout.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/src/gtkext/graph/layout.c b/src/gtkext/graph/layout.c index de83a22..d2e3b51 100644 --- a/src/gtkext/graph/layout.c +++ b/src/gtkext/graph/layout.c @@ -169,7 +169,8 @@ static void g_graph_layout_finalize(GGraphLayout *layout) * Remarques : - * * * ******************************************************************************/ - +#include "../../arch/instruction-int.h" // REMME +#include "nodes/flow.h" GGraphLayout *g_graph_layout_new(GInstrBlock *blocks, GtkBufferView **views, size_t count) { GGraphLayout *result; /* Structure à retourner */ @@ -222,18 +223,49 @@ GGraphLayout *g_graph_layout_new(GInstrBlock *blocks, GtkBufferView **views, siz bool _print_dbg_ext_cb(GGraphNode *node, GNodeVisitState state, int *depth) { int i; + PendingPositionFlags pending_flag; + char *flags; GtkAllocation alloc; + GArchInstruction *first; + GArchInstruction *last; + + char *flags_list[] = { + "NONE", + "DIRECT_X", + "LEFT_MARGIN", + "RIGHT_MARGIN", + "LEFT_NODE", + "RIGHT_NODE" + }; + if (state == GVS_ENTER || state == GVS_NODE) { + + + for (i = 0; i < *depth; i++) printf(" "); + g_graph_node_get_pending_position(node, &pending_flag, (pending_position []) { { 0 } }); + flags = flags_list[pending_flag]; + alloc = g_graph_node_get_allocation(node); - printf("- %p - (%d ; %d) - (%d ; %d)\n", node, + printf("- %p - \"%s\" - (%d ; %d) - (%d ; %d)", node, + flags, alloc.x, alloc.y, alloc.width, alloc.height); + if (G_IS_FLOW_NODE(node)) + { + printf(" - rank = %u -", g_graph_node_get_rank(node)); + + g_flow_block_get_boundary(g_flow_node_get_block(node), &first, &last); + printf(" - 0x%08x <-> 0x%08x", first->range.addr.virtual, last->range.addr.virtual); + } + + printf("\n"); + } if (state == GVS_ENTER) (*depth)++; |