about summary refs log tree commit diff stats
path: root/example/disasm/full.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2016-01-25 11:05:29 +0100
committerAjax <commial@gmail.com>2016-01-26 17:09:18 +0100
commit455cfbe8b7aed7cb5be8e1b9aa1917a9f7d51821 (patch)
tree58c354de7afe7b4b0ca6af923616941ba9c2e79e /example/disasm/full.py
parent01b1f292c84d4cbda38b6c308fc7b1af52595cec (diff)
downloadfocaccia-miasm-455cfbe8b7aed7cb5be8e1b9aa1917a9f7d51821.tar.gz
focaccia-miasm-455cfbe8b7aed7cb5be8e1b9aa1917a9f7d51821.zip
BasicBlocks: update examples with the new API
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..25e3a018 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, BasicBlocks
 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 = BasicBlocks()
 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')