dladdr

variable name, function arguments at run time in C

落爺英雄遲暮 提交于 2019-12-01 20:02:32
问题 Is it possible to know a function arguments and variables' name types at runtime in C program ? For example, if I have a function: int abc(int x, float y , somestruct z ){ char a; int b ; } Can I know inside this function abc() , what are the names of arguments and variables i.e. in this case its x , y , z , a , b and they are of type int , float , somestruct , char , int . Say if there is another function: float some_func(specialstruct my_struct, int index){ } I should know that arguments

variable name, function arguments at run time in C

陌路散爱 提交于 2019-12-01 18:37:59
Is it possible to know a function arguments and variables' name types at runtime in C program ? For example, if I have a function: int abc(int x, float y , somestruct z ){ char a; int b ; } Can I know inside this function abc() , what are the names of arguments and variables i.e. in this case its x , y , z , a , b and they are of type int , float , somestruct , char , int . Say if there is another function: float some_func(specialstruct my_struct, int index){ } I should know that arguments name are my_struct , index and types are specialstruct , int . I need this info at runtime ? I have