Perl Help

M

mihirtr

Hi,
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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top