I have a large section in IDA that is a data lookup table of word length data. I want to change them all to word length rather than byte length. I know you can make an array but when I do it becomes an array of bytes.

  1. Create one word (or dword)
  2. Use the "Make array" command to create an array of words. You can select the range of data you want to convert to automatically calculate the item count.

If you want to have each element as a separate item and not part of array, uncheck the "Create as array" option.

| improve this answer | |

There may be a better way of doing it, but I've always accomplished this with a simple script that lets me just select the range of bytes that I want to convert to dwords. Something like:

ea = SelStart()
end = SelEnd()

print "Making DWORDs from 0x%X - 0x%X" % (ea, end)

MakeUnknown(ea, (end-ea), DOUNK_SIMPLE)

while ea < end:
    ea += 4
| improve this answer | |
  • That's a good idea, I haven't started using scripts that much yet so I didn't even think about doing that. – gigawatt May 1 '13 at 15:04

Here is how I did it.
I changed the first couple of bytes to data, made an array so I had an array of words and then edited the array to contain more elements.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.