diff options
| author | Camille Mougey <commial@gmail.com> | 2017-01-06 14:36:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-06 14:36:26 +0100 |
| commit | fd1f440961b24872a5a9c0da19cfc94d1d955386 (patch) | |
| tree | 6556ddfd9a7082b2ad8bb2c72228e3d0ab6fbdea /miasm2/ir/analysis.py | |
| parent | c5d47bd8cdb510c78501adae460b35d122042563 (diff) | |
| parent | 58e436386f738b2ce38ad1db8b13fc6e16fe293a (diff) | |
| download | miasm-fd1f440961b24872a5a9c0da19cfc94d1d955386.tar.gz miasm-fd1f440961b24872a5a9c0da19cfc94d1d955386.zip | |
Merge pull request #469 from serpilliere/updt_call_effects_api
Updt call effects api
Diffstat (limited to '')
| -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 52fbf2e9..0913019b 100644 --- a/miasm2/ir/analysis.py +++ b/miasm2/ir/analysis.py @@ -28,11 +28,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( |