Reputation: 93
I have a list of tenthousands of {Address} - {Function Name} pairs I dumped with a tool I wrote. Now I want to rename all functions so for example sub_123456 becomes "FooBar", because the list says so.
Any way to do that?
Thanks.
Upvotes: 1
Views: 4937
Reputation: 2776
In such cases i would load the list in Vim, change the list to have two columns, the first the addresses, the second the desired names. Like this:
123456 FooBar
124584 BarFoo
Then do :%s/^\(\w\+\)\s\+\(\w\+\)/MakeName(0x\1, "\2");
, ending up with a list like this:
MakeName(0x123456, "FooBar");
MakeName(0x124584, "BarFoo");
Then copy the entire Vim buffer to the clipboard with 1G
and "*yG
.
Then in IDA type Shift-F2
to open the manual script editor, and paste using Cmd-V or Ctrl-V.
Upvotes: 6