idautils.py: added qword support for GetDataList()

This commit is contained in:
elias.bachaalany 2009-09-23 07:03:16 +00:00
parent 5e0deab556
commit 45099f4ad4

View File

@ -244,16 +244,16 @@ def GetDataList(ea, count, itemsize=1):
"""
Get data list - INTERNAL USE ONLY
"""
getdata = None
if itemsize == 1:
getdata = idaapi.get_byte
if itemsize == 2:
elif itemsize == 2:
getdata = idaapi.get_word
if itemsize == 4:
elif itemsize == 4:
getdata = idaapi.get_long
assert getdata, "Invalid data size! Must be 1, 2 or 4"
elif itemsize == 8:
getdata = idaapi.get_qword
else:
raise ValueError, "Invalid data size! Must be 1, 2, 4 or 8"
for curea in xrange(ea, ea+itemsize*count, itemsize):
yield getdata(curea)