def get_ins_xref(self, ins, addr):
"""
An instruction may reference other instruction.
Example: SETUP_EXCEPT exc_handler
the exception handler is the xref.
"""
xref_ins = (dis.opmap[x] for x in ('SETUP_LOOP', 'SETUP_EXCEPT', 'SETUP_FINALLY', 'SETUP_WITH'))
if ins.opcode in xref_ins:
return addr + ins.size + ins.arg
else:
return None
disassembler.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录