about summary refs log tree commit diff stats
path: root/example/disasm/full.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2016-01-26 17:45:24 +0100
committerserpilliere <serpilliere@users.noreply.github.com>2016-01-26 17:45:24 +0100
commitc1bc56754495e1c2a4176aaa486de9e58cb02a88 (patch)
tree1ca51aab9e0908e3f11b0cccc7ad7f50be349f67 /example/disasm/full.py
parentb3fae7887d63bcdbb18b25ade6d20f152d802005 (diff)
parentd6222c4383891c6706ce70ec7750b42ee24e1cfc (diff)
downloadmiasm-c1bc56754495e1c2a4176aaa486de9e58cb02a88.tar.gz
miasm-c1bc56754495e1c2a4176aaa486de9e58cb02a88.zip
Merge pull request #309 from commial/feature-basicblocks
Feature AsmCFG
Diffstat (limited to 'example/disasm/full.py')
-rw-r--r--example/disasm/full.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/example/disasm/full.py b/example/disasm/full.py
index 33b2f41f..0b0069c6 100644
--- a/example/disasm/full.py
+++ b/example/disasm/full.py
@@ -4,7 +4,7 @@ from argparse import ArgumentParser
 from pdb import pm
 
 from miasm2.analysis.binary import Container
-from miasm2.core.asmbloc import log_asmbloc, asm_label, bloc2graph
+from miasm2.core.asmbloc import log_asmbloc, asm_label, AsmCFG
 from miasm2.expression.expression import ExprId
 from miasm2.core.interval import interval
 from miasm2.analysis.machine import Machine
@@ -142,15 +142,13 @@ while not finish and todo:
 
 
 # Generate dotty graph
-all_blocs = []
+all_blocs = AsmCFG()
 for blocs in all_funcs_blocs.values():
     all_blocs += blocs
-    # for b in blocs:
-    #    print b
+
 
 log.info('generate graph file')
-g = bloc2graph(all_blocs, True)
-open('graph_execflow.dot', 'w').write(g)
+open('graph_execflow.dot', 'w').write(all_blocs.dot(label=True))
 
 log.info('generate intervals')