about summary refs log tree commit diff stats
path: root/example/ida/graph_ir.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2015-12-12 14:35:24 +0100
committerserpilliere <serpilliere@users.noreply.github.com>2015-12-12 14:35:24 +0100
commitb32eb145fce7dd09bef025a9f82b2507bd4e02ee (patch)
tree2c65f005adb7830853664451aed3f2cd05a9be73 /example/ida/graph_ir.py
parent635f372fa846b28252ab86b344a2565f51e2302c (diff)
parentd95af9858230c41449d6fd487a93bdc337780ea7 (diff)
downloadmiasm-b32eb145fce7dd09bef025a9f82b2507bd4e02ee.tar.gz
miasm-b32eb145fce7dd09bef025a9f82b2507bd4e02ee.zip
Merge pull request #290 from commial/refactor-ira
Refactor ira
Diffstat (limited to 'example/ida/graph_ir.py')
-rw-r--r--example/ida/graph_ir.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/example/ida/graph_ir.py b/example/ida/graph_ir.py
index c3d88c36..b181f72a 100644
--- a/example/ida/graph_ir.py
+++ b/example/ida/graph_ir.py
@@ -56,7 +56,7 @@ class GraphMiasmIR(GraphViewer):
                 continue
             dst = ir_arch.dst_trackback(irbloc)
             for d in dst:
-                if not self.ir_arch.ExprIsLabel(d):
+                if not expr_is_label(d):
                     continue
 
                 d = d.name
@@ -138,8 +138,7 @@ for irb in ir_arch.blocs.values():
         for i, expr in enumerate(irs):
             irs[i] = ExprAff(expr_simp(expr.dst), expr_simp(expr.src))
 
-ir_arch.gen_graph()
-out = ir_arch.graph()
+out = ir_arch.graph.dot()
 open(os.path.join(tempfile.gettempdir(), 'graph.dot'), 'wb').write(out)
 
 
@@ -197,7 +196,6 @@ def get_modified_symbols(sb):
 def gen_bloc_data_flow_graph(ir_arch, in_str, ad):  # arch, attrib, pool_bin, bloc, symbol_pool):
     out_str = ""
 
-    ir_arch.gen_graph()
     # ir_arch.dead_simp()
 
     irbloc_0 = None