def get_segment_functions(segment):
'''Returns functions for a given segment.
Args:
segment (`segment_t`): The segment functions will be returned
from. segment_t objects are returned from IDA's getseg API.
Returns:
list: Empty list or list of MetadataShim objects on success.
None: None on failure.
Fails if argument is not a segment_t or there are no functions
in that segment.
'''
if not isinstance(segment, idaapi.segment_t):
return None
segment_offset = segment.startEA - IDAW.get_imagebase()
if segment_offset not in FIRST.function_list:
return None
return FIRST.function_list[segment_offset].values()
评论列表
文章目录