diff options
| author | Camille Mougey <commial@gmail.com> | 2017-08-21 13:21:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-21 13:21:16 +0200 |
| commit | f66e973a8c376516d6ea09743e529fe6bd0a7b68 (patch) | |
| tree | 5f170aa4a39c7c7eb608e11f1f16faa7b725b59a | |
| parent | 1a938c58ae1dfd7696ba1a1dec20b48f2f846b24 (diff) | |
| parent | c8d20b8f1a58e01b9b43eff4b29866c8b388e3b8 (diff) | |
| download | miasm-f66e973a8c376516d6ea09743e529fe6bd0a7b68.tar.gz miasm-f66e973a8c376516d6ea09743e529fe6bd0a7b68.zip | |
Merge pull request #604 from serpilliere/fix_ctype_example
Example/ctype: fix propagation on mem write
| -rw-r--r-- | example/ida/ctype_propagation.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/example/ida/ctype_propagation.py b/example/ida/ctype_propagation.py index 7eb209cd..c18abbfd 100644 --- a/example/ida/ctype_propagation.py +++ b/example/ida/ctype_propagation.py @@ -123,7 +123,9 @@ class SymbExecCTypeFix(SymbExecCType): # Replace PC with value to match IR args pc_fixed = {self.ir_arch.pc: m2_expr.ExprInt(instr.offset + instr.l, self.ir_arch.pc.size)} - for arg in tmp_r: + inputs = tmp_r + inputs.update(arg for arg in tmp_w if arg.is_mem()) + for arg in inputs: arg = expr_simp(arg.replace_expr(pc_fixed)) if arg in tmp_w and not arg.is_mem(): continue |