diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-07-18 07:44:59 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-07-18 07:45:08 +0200 |
| commit | 7d2227eeb09a0ec43a837082570a0cb955651daa (patch) | |
| tree | 04780ca818378f42bc91efe2fc2d88a2d77692f7 /example/ida/ctype_propagation.py | |
| parent | cf74092981e4f3fa7bed9ce182a38e570653a138 (diff) | |
| download | focaccia-miasm-7d2227eeb09a0ec43a837082570a0cb955651daa.tar.gz focaccia-miasm-7d2227eeb09a0ec43a837082570a0cb955651daa.zip | |
IR/Analysis: call_effects can add extra blocks
Diffstat (limited to 'example/ida/ctype_propagation.py')
| -rw-r--r-- | example/ida/ctype_propagation.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/example/ida/ctype_propagation.py b/example/ida/ctype_propagation.py index e8b52e3e..3c8a745a 100644 --- a/example/ida/ctype_propagation.py +++ b/example/ida/ctype_propagation.py @@ -230,11 +230,14 @@ def get_ira_call_fixer(ira): stk_after = idc.GetSpd(instr.offset + instr.l) stk_diff = stk_after - stk_before print hex(stk_diff) - return [AssignBlock([ExprAff(self.ret_reg, ExprOp('call_func_ret', ad)), - ExprAff(self.sp, self.sp + ExprInt(stk_diff, self.sp.size)) - ], - instr - )] + call_assignblk = AssignBlock( + [ + ExprAff(self.ret_reg, ExprOp('call_func_ret', ad)), + ExprAff(self.sp, self.sp + ExprInt(stk_diff, self.sp.size)) + ], + instr + ) + return [call_assignblk], [] return iraCallStackFixer |