Can I find out the parameters of functions and types of variable names at run time in a C program? For example, if I have a function:
int abc(int x, float y , somestruct z ){
char a;
int b ;
}
Can I find out inside this function abc()what are the names of the arguments and variables, i.e. In this case, it x, y, z, a, band they are of the type int, float, somestruct, char, int.
Tell me if there is another function:
float some_func(specialstruct my_struct, int index){
}
I need to know that the argument names my_struct, indexand types specialstruct, int.
Do I need this information at runtime?
I have access to the base pointer and return address, can I get the necessary information using the pointer above.
, dladdr().
, GDB , ?