def nextstack(cls, ea, delta):
'''Return the next instruction from ``ea`` that is past the sp delta ``delta``.'''
fn,sp = function.top(ea), function.get_spdelta(ea)
_,end = function.chunk(ea)
res = cls.walk(ea, cls.next, lambda ea: ea < end and abs(function.get_spdelta(ea) - sp) < delta)
if res == idaapi.BADADDR or res >= end:
raise ValueError("{:s}.nextstack({:x}, {:+x}) : Unable to locate instruction matching contraints due to walking outside the bounds of the function {:x} : {:x} >= {:x}".format('.'.join((__name__,cls.__name__)), ea, delta, fn, res, end))
return res
评论列表
文章目录