📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  IDA Pro  >>  How do you get a function's prototype?

Topic created on: June 28, 2007 05:41 CDT by luckiejacky .

Hi,
I'd like to retrieve the current function's prototype...
Are there any possible ways I can do that?
Thanks in advance
Jack

  Paolo     June 28, 2007 06:13.16 CDT
Just browsing the official IDA Pro online help (http://www.datarescue.com/idabase/idadoc/index.htm) you can easily find:

GetType

** Get type of function/variable
        ea - the address of the object
   returns: C declaration type string, or 0 - failed

string GetType(long ea);

Hope this helps,

   Paolo

  luckiejacky   June 29, 2007 10:43.12 CDT
Hi Paolo,
I found that page. But there is link error.
It seems to be an IDC script function
What is IDC?
Thanks
Jack

  luckiejacky   June 29, 2007 11:07.09 CDT
IDC command...
SetType (0x4052E0, GetType(0x4052E0));
Not working, The function type still not shown.
Any ideas?
Thanks
Jack

  luckiejacky   June 29, 2007 11:25.12 CDT

#include <idc.idc>

static main() {
  auto ea,x,s;
  for (ea=NextFunction(0); ea != BADADDR; ea=NextFunction(ea))
  {
   x=GetType(ea);  
        s=SetType(ea,x);
Message ("%d\n",s);
        Message ("%s\n",x);
   }  
  
}

I wrote this piece of code, it still doesn't work...
any corrections or comments?

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit