def get_func_code_refs_to(func_ea):
"""Returns a set with the code references to this function"""
code_refs = set()
for ref in idautils.CodeRefsTo(func_ea, 0): #callers
func_ida = idaapi.get_func(ref)
if not func_ida:
#print "BUG?: coderef came from no function! %X->%X"%(ref, addr)
continue
#if func_ida.startEA not in functions:
# print "BUG?: function %X not in our set (r=%X)!"%(func_ida.startEA, ref)
# continue
code_refs.add((ref, func_ida.startEA))
return code_refs
评论列表
文章目录