diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2014-09-19 13:58:03 +0200 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2014-09-19 13:58:03 +0200 |
| commit | 2bc1d7810dd07f9a0401984125fc82ac5ac7d9aa (patch) | |
| tree | 40e084cd2bb9e6224c1fdbfef158f71102863897 /example/expression/manip_expression2.py | |
| parent | 69c35ab316c0dae069ad7fb9d0567c6dd8746a8e (diff) | |
| download | focaccia-miasm-2bc1d7810dd07f9a0401984125fc82ac5ac7d9aa.tar.gz focaccia-miasm-2bc1d7810dd07f9a0401984125fc82ac5ac7d9aa.zip | |
Expression examples: Rename examples with meaningfull names
Diffstat (limited to 'example/expression/manip_expression2.py')
| -rw-r--r-- | example/expression/manip_expression2.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/example/expression/manip_expression2.py b/example/expression/manip_expression2.py deleted file mode 100644 index faa3f9df..00000000 --- a/example/expression/manip_expression2.py +++ /dev/null @@ -1,26 +0,0 @@ -from miasm2.arch.x86.arch import mn_x86 -from miasm2.expression.expression import get_rw -from miasm2.arch.x86.ira import ir_a_x86_32 -print """ -Simple expression manipulation demo. -Get read/written registers for a given instruction -""" - -arch = mn_x86 -ir_arch = ir_a_x86_32() - -l = arch.fromstring('LODSB', 32) -l.offset, l.l = 0, 15 -ir_arch.add_instr(l) - -print '*' * 80 -for lbl, b in ir_arch.blocs.items(): - print b - for irs in b.irs: - o_r, o_w = get_rw(irs) - print 'read: ', [str(x) for x in o_r] - print 'written:', [str(x) for x in o_w] - print -ir_arch.gen_graph() -g = ir_arch.graph() -open('graph_instr.txt', 'w').write(g) |