summaryrefslogtreecommitdiff
path: root/src/gtkext/gtkgraphview.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-01-05 13:30:19 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-01-05 13:30:19 (GMT)
commitd626276398a3cdd3cd6432e073a8866aa91418ce (patch)
tree15e4b325ebb0636b26058cd39fda3e1e87b534cc /src/gtkext/gtkgraphview.c
parentbfd81d1f289913f4d6e09cd8d99f4aaeed98436b (diff)
Refined the definition of basic blocks and used them to build extra clusters for dot.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@317 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/gtkgraphview.c')
-rw-r--r--src/gtkext/gtkgraphview.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gtkext/gtkgraphview.c b/src/gtkext/gtkgraphview.c
index 67fb577..6aedf26 100644
--- a/src/gtkext/gtkgraphview.c
+++ b/src/gtkext/gtkgraphview.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* gtkgraphview.c - affichage de morceaux de code sous forme graphique
*
- * Copyright (C) 2009-2012 Cyrille Bagard
+ * Copyright (C) 2009-2013 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -39,8 +39,9 @@ struct _GtkGraphView
GtkViewPanel parent; /* A laisser en premier */
GtkFixed *support; /* Support des vues en bloc */
- vmpa_t start; /* Début de la portion vue */
- vmpa_t end; /* Fin de la portion affichée */
+ GBinRoutine *routine; /* Routine en cours d'affichage*/
+ vmpa_t start; /* Début de la portion vue */ /* FIXME : à garder ? */
+ vmpa_t end; /* Fin de la portion affichée */ /* FIXME : à garder ? */
GtkViewPanel **children; /* Liste des sous-blocs */
GtkAllocation *allocs; /* Emplacements prévisibles */
@@ -380,6 +381,9 @@ static void gtk_graph_view_define_main_address(GtkGraphView *view, vmpa_t addr)
if (start <= addr && addr < end)
{
+ view->routine = routines[i];
+ g_object_ref(G_OBJECT(view->routine));
+
view->start = start;
view->end = end;
@@ -389,7 +393,8 @@ static void gtk_graph_view_define_main_address(GtkGraphView *view, vmpa_t addr)
view->allocs = (GtkAllocation *)calloc(view->children_count,
sizeof(GtkAllocation));
- build_graph_view(view, view->children, view->children_count);
+ build_graph_view(view, g_binary_routine_get_basic_blocks(view->routine),
+ view->children, view->children_count);
break;
@@ -425,7 +430,8 @@ static void gtk_graph_view_prepare_resize(GtkGraphView *view)
for (i = 0; i < view->children_count; i++)
gtk_widget_queue_resize(GTK_WIDGET(view->children[i]));
- build_graph_view(view, view->children, view->children_count);
+ build_graph_view(view, g_binary_routine_get_basic_blocks(view->routine),
+ view->children, view->children_count);
change_editor_items_current_view_content(GTK_VIEW_PANEL(view));