Re: Getting function signature
- From: gordonb.clgjw@xxxxxxxxxxx (Gordon Burditt)
- Date: Tue, 11 Mar 2008 23:26:08 -0000
I need to get information about a given function signature on the
fly. Parameter quantity, order and type is sufficient. I've been
searching around, but I can't come up with any info. Any ideas?
Assembly solutions are welcome. Thanks. --korney
From the source code? Have you looked at cproto? It generatesdeclarations of functions in a source file (and what it includes)
from the source file. You still need to parse the declarations.
That also requires understanding the typedefs that might show
up in the declarations.
From object code? *MUCH* harder if it's even possible. It ishighly likely that two functions, differing only in the first
parameter being int in the first, and long in the second, on a
platform where long and int are the same size, will generate identical
code (and if there are no debugging symbols, identical object files
entirely.
Depending on how that parameter is actually used (it might only be
passed to other functions), it may be impossible to tell the
difference between signed int and unsigned int, int and enum, long
and pointer, etc.
.
- References:
- Getting function signature
- From: jk
- Getting function signature
- Prev by Date: Re: I need help please!
- Next by Date: Re: visual C++ 6
- Previous by thread: Re: Getting function signature
- Next by thread: Re: Getting function signature
- Index(es):
Relevant Pages
|