From 45099f4ad41bbb0e4fb8f7554defb8ed0dc48f9e Mon Sep 17 00:00:00 2001 From: "elias.bachaalany" Date: Wed, 23 Sep 2009 07:03:16 +0000 Subject: [PATCH] idautils.py: added qword support for GetDataList() --- python/idautils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/idautils.py b/python/idautils.py index 0d11320..b5b4afa 100644 --- a/python/idautils.py +++ b/python/idautils.py @@ -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)