Perl Help
am 17.08.2007 16:08:39 von mihirtrHi,
I have trying see if it is possible using perl to do following.
I have multiple C/C++ files which I need to go manually and find out
specific function call. I want to check 2nd parameter of this function
(Function_To_Look_For) and get value of it and store it in local file
or output it. For example:
Lets say there is a file named: abc.c It has following contents.
void
MY_CLASS:: Func1()
{
STRUCT_1_T my_struct1;
Function_To_Look_For (MY_1ST_PARAMETER,
sizeof( STRUCT_1_T ),
MY_3RD_PARAMETER);
}
void
MY_CLASS:: Func2()
{
STRUCT_2_T my_struct2;
Function_To_Look_For (MY_1ST_PARAMETER,
sizeof(STRUCT_2_T ),
MY_3RD_PARAMETER);
}
After running this script, I want get "sizeof( STRUCT_1_T )" ,
"sizeof(STRUCT_2_T )" as outputs.
I am not sure if this is possible, just wanted to check with experts
on this.
Thanks,