diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2020-03-18 15:57:36 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2020-05-04 00:21:44 +0200 |
| commit | 257d63333ea152bdc55f954481fe846651faffe7 (patch) | |
| tree | 0fc38e45d4c3d48488b717df2b7229d5f1c9dcf4 /example/disasm/full.py | |
| parent | da44766edbcefa8707deaed55ff6d3c22ecdb3ca (diff) | |
| download | miasm-257d63333ea152bdc55f954481fe846651faffe7.tar.gz miasm-257d63333ea152bdc55f954481fe846651faffe7.zip | |
Updt propagation expression algorithm
Diffstat (limited to 'example/disasm/full.py')
| -rw-r--r-- | example/disasm/full.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/example/disasm/full.py b/example/disasm/full.py index d4fae867..57263a6f 100644 --- a/example/disasm/full.py +++ b/example/disasm/full.py @@ -10,8 +10,7 @@ from miasm.core.asmblock import log_asmblock, AsmCFG from miasm.core.interval import interval from miasm.analysis.machine import Machine from miasm.analysis.data_flow import \ - DiGraphDefUse, ReachingDefinitions, \ - replace_stack_vars, load_from_int, del_unused_edges + DiGraphDefUse, ReachingDefinitions, load_from_int from miasm.expression.simplifications import expr_simp from miasm.analysis.ssa import SSADiGraph from miasm.ir.ir import AssignBlock, IRBlock @@ -65,10 +64,6 @@ parser.add_argument('-p', "--ssa", action="store_true", help="Generate the ssa form in 'ssa.dot'.") parser.add_argument('-x', "--propagexpr", action="store_true", help="Do Expression propagation.") -parser.add_argument('-y', "--stack2var", action="store_true", - help="*Try* to do transform stack accesses into variables. " - "Use only with --propagexpr option. " - "WARNING: not reliable, may fail.") parser.add_argument('-e', "--loadint", action="store_true", help="Load integers from binary in fixed memory lookup.") parser.add_argument('-j', "--calldontmodstack", action="store_true", @@ -309,16 +304,11 @@ if args.propagexpr: ssa = self.do_simplify_loop(ssa, head) ircfg = self.ssa_to_unssa(ssa, head) - if args.stack2var: - replace_stack_vars(self.ir_arch, ircfg) - ircfg_simplifier = IRCFGSimplifierCommon(self.ir_arch) ircfg_simplifier.deadremoval.add_expr_to_original_expr(ssa.ssa_variable_to_expr) ircfg_simplifier.simplify(ircfg, head) return ircfg - - head = list(entry_points)[0] simplifier = CustomIRCFGSimplifierSSA(ir_arch_a) ircfg = simplifier.simplify(ircfg_a, head) |