How to copy functions from IDA - General Discussion and Assistance - CHDK Forum

How to copy functions from IDA

  • 6 Replies
  • 7201 Views
How to copy functions from IDA
« on: 03 / April / 2008, 09:03:59 »
Advertisements

 I'm not very familiar to IDA,so please bear with me as I ask the following silly question.

When I try to copy a function into my code from the IDB file,I just select the portion and right click to get
copy option and then copy and paste it in wordpad. But what annoying thing happens is that before each
line, the ROM locations are also copied,so I've to manually remove those from hundreds of line. Also copied
are IDA comments like "; CODE XREF ...." which I don't want to copy.

What is the proper way of copying a function?(I'm sure this is not!)

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: How to copy functions from IDA
« Reply #1 on: 03 / April / 2008, 09:27:34 »
Look to asmify.sh script in trunk/tools (for Windows). For Linux - same script in vitalyb branch.

Re: How to copy functions from IDA
« Reply #2 on: 03 / April / 2008, 09:28:53 »
I just found out another way,by changing preferences in Options->General tab of IDA.

Edit: But it does not insert quotation marks and newline symbols (that is needed by gcc)
which asmify.sh does. So using 'asmify.sh' will be best.
« Last Edit: 03 / April / 2008, 09:49:33 by noname »

Re: How to copy functions from IDA
« Reply #3 on: 03 / April / 2008, 13:58:09 »
But what is the command to run asmify.sh? Should it be run on bash.exe supplied in the gcc environment
for CHDK? What is the actual syntax?

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: How to copy functions from IDA
« Reply #4 on: 03 / April / 2008, 15:01:02 »
But what is the command to run asmify.sh? Should it be run on bash.exe supplied in the gcc environment
for CHDK? What is the actual syntax?

sh.exe asmify.sh < in.txt > out.txt

Re: How to copy functions from IDA
« Reply #5 on: 03 / April / 2008, 15:11:43 »
Thanks a lot,ewavr. Now I can get the required things by typing those commands at 'sh.exe' prompt.

Re: How to copy functions from IDA
« Reply #6 on: 04 / June / 2008, 13:59:28 »
Thanks a lot even from me :)

 

Related Topics


SimplePortal © 2008-2014, SimplePortal