diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2016-01-26 17:45:24 +0100 |
|---|---|---|
| committer | serpilliere <serpilliere@users.noreply.github.com> | 2016-01-26 17:45:24 +0100 |
| commit | c1bc56754495e1c2a4176aaa486de9e58cb02a88 (patch) | |
| tree | 1ca51aab9e0908e3f11b0cccc7ad7f50be349f67 /example/disasm/full.py | |
| parent | b3fae7887d63bcdbb18b25ade6d20f152d802005 (diff) | |
| parent | d6222c4383891c6706ce70ec7750b42ee24e1cfc (diff) | |
| download | miasm-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.py | 10 |
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') |