Skip to content

Commit

Permalink
Merge pull request #324 from serpilliere/jitter_handle_ret
Browse files Browse the repository at this point in the history
Jitter: handle emulated funcs ret
  • Loading branch information
p-l- committed Feb 9, 2016
2 parents 0b03ea9 + f5b9017 commit 2cf6970
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions miasm2/jitter/jitload.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,14 @@ def handle_lib(jitter):
else:
log.debug('%r', fname)
raise ValueError('unknown api', hex(jitter.pc), repr(fname))
func(jitter)
ret = func(jitter)
jitter.pc = getattr(jitter.cpu, jitter.ir_arch.pc.name)
return True

# Don't break on a None return
if ret is None:
return True
else:
return ret

def handle_function(self, f_addr):
"""Add a brakpoint which will trigger the function handler"""
Expand Down

0 comments on commit 2cf6970

Please sign in to comment.