summaryrefslogtreecommitdiff
path: root/src/gtkext/graph/layout.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-11-19 21:26:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-11-19 21:26:51 (GMT)
commit5a70286f7f56cc72a0249fcaf404afabfb033956 (patch)
treeef2b94b04a3e84b93832749ccf6cd9b9cc370d3c /src/gtkext/graph/layout.c
parent760e2e7346518dd1264126c1696f9ad88884d64c (diff)
Handled Dalvik exception handlers in the graphic view.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@285 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/graph/layout.c')
-rw-r--r--src/gtkext/graph/layout.c35
1 files changed, 9 insertions, 26 deletions
diff --git a/src/gtkext/graph/layout.c b/src/gtkext/graph/layout.c
index 64a8236..3a2f4e3 100644
--- a/src/gtkext/graph/layout.c
+++ b/src/gtkext/graph/layout.c
@@ -137,7 +137,6 @@ static char *complete_graph_links(const GtkGraphView *view, GtkViewPanel **views
size_t j; /* Boucle de parcours #2 */
size_t k; /* Boucle de parcours #3 */
char cmd[LINKS_DESC_LEN]; /* Tampon pour l'ajout de liens*/
- GArchInstruction *next; /* Instruction suivante */
if (count == 0)
return desc;
@@ -168,6 +167,7 @@ static char *complete_graph_links(const GtkGraphView *view, GtkViewPanel **views
if (k < count)
switch (types[j])
{
+ case ILT_EXEC_FLOW:
case ILT_JUMP:
snprintf(cmd, LINKS_DESC_LEN,
"_%p:s -> _%p:n [ltail=cluster_%p, lhead=cluster_%p];\n",
@@ -191,6 +191,14 @@ static char *complete_graph_links(const GtkGraphView *view, GtkViewPanel **views
desc = stradd(desc, cmd);
break;
+ case ILT_CATCH_EXCEPTION:
+ snprintf(cmd, LINKS_DESC_LEN,
+ "_%p:s -> _%p:n [ltail=cluster_%p, lhead=cluster_%p, " \
+ "color=gray];\n",
+ views[i], views[k], views[i], views[k]);
+ desc = stradd(desc, cmd);
+ break;
+
default:
break;
@@ -200,31 +208,6 @@ static char *complete_graph_links(const GtkGraphView *view, GtkViewPanel **views
}
- /* Sinon on suit le flux normal */
- else
- {
- if (g_arch_instruction_is_return(last))
- continue;
-
- next = g_arch_instruction_get_next_iter(instrs, last, VMPA_MAX);
- if (next == NULL) continue;
-
- g_arch_instruction_get_location(next, NULL, NULL, &addr);
-
- for (k = 0; k < count; k++)
- if (gtk_view_panel_contain_address(views[k], addr))
- break;
-
- if (k < count)
- {
- snprintf(cmd, LINKS_DESC_LEN,
- "_%p:s -> _%p:n [ltail=cluster_%p, lhead=cluster_%p];\n",
- views[i], views[k], views[i], views[k]);
- desc = stradd(desc, cmd);
- }
-
- }
-
}
return desc;