diff options
Diffstat (limited to 'miasm2/ir/analysis.py')
| -rw-r--r-- | miasm2/ir/analysis.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/miasm2/ir/analysis.py b/miasm2/ir/analysis.py index 70fda11c..c606d958 100644 --- a/miasm2/ir/analysis.py +++ b/miasm2/ir/analysis.py @@ -29,11 +29,16 @@ class ira(ir): """Returns ids of all registers used in the IR""" return self.arch.regs.all_regs_ids + [self.IRDst] - def call_effects(self, ad): - """ - Default simulation of a function call to @ad + def call_effects(self, ad, instr): + """Default modelisation of a function call to @ad. This may be used to: + + * insert dependencies to arguments (stack base, registers, ...) + * add some side effects (stack clean, return value, ...) + @ad: (Expr) address of the called function + @instr: native instruction which is responsible of the call """ + return [AssignBlock( [ExprAff(self.ret_reg, ExprOp('call_func_ret', ad, self.sp)), ExprAff(self.sp, ExprOp( |