def dump_data():
"""Extracts and dumps useful data from the file being processed.
The output is written using pickle and it consists of a set with all the
code heads followed by func.Function objects (ended with a None)."""
def __dump(out, type, lb=0, ub=0):
if type == 'code_head':
cPickle.dump(get_code_heads(), out, cPickle.HIGHEST_PROTOCOL)
for f in functions_iter():
cPickle.dump(f, out, cPickle.HIGHEST_PROTOCOL)
if type == 'code_blk':
for bc in _get_blocks_codes_per_func_iter():
cPickle.dump(bc, out, cPickle.HIGHEST_PROTOCOL)
cPickle.dump(None, out)
out.close()
__dump(util.open_dump(idaapi.get_input_file_path(), 'wb', 'dmp'), 'code_head')
__dump(util.open_dump(idaapi.get_input_file_path(), 'wb', 'code_blk'), 'code_blk')
评论列表
文章目录