mirror of
https://github.com/cemu-project/idapython.git
synced 2024-12-27 02:01:51 +01:00
idautils.py: Added Chunk() to list function chunks. Thanks to Ero Carrera for the patch.
This commit is contained in:
parent
52f26ecf67
commit
d0e3a964d8
@ -172,6 +172,28 @@ def Functions(start, end):
|
||||
return funclist
|
||||
|
||||
|
||||
def Chunks(start):
|
||||
"""
|
||||
Get a list of function chunks
|
||||
|
||||
@param start: address of the function
|
||||
|
||||
@return: list of funcion chunks (tuples of the form (start_ea, end_ea))
|
||||
belonging to the function
|
||||
"""
|
||||
function_chunks = []
|
||||
|
||||
func_iter = idaapi.func_tail_iterator_t( idaapi.get_func( start ) )
|
||||
status = func_iter.main()
|
||||
|
||||
while status:
|
||||
chunk = func_iter.chunk()
|
||||
function_chunks.append((chunk.startEA, chunk.endEA))
|
||||
status = func_iter.next()
|
||||
|
||||
return function_chunks
|
||||
|
||||
|
||||
def Segments():
|
||||
"""
|
||||
Get list of segments (sections) in the binary image
|
||||
|
Loading…
Reference in New Issue
Block a user