def clear_prefix(function_address):
"""
Clear the prefix from a given function.
"""
original_name = get_function_name(function_address)
#
# locate the last (rfind) prefix separator in the function name as
# we will want to keep everything that comes after it
#
i = original_name.rfind(PREFIX_SEPARATOR)
# if there is no prefix (separator), there is nothing to trim
if i == -1:
return
# trim the prefix off the original function name and discard it
new_name = original_name[i+1:]
# rename the function with the prefix stripped
idaapi.set_name(function_address, new_name, idaapi.SN_NOWARN)
评论列表
文章目录