I want to trace each path of function calls.
For eg:
int a()
{
b();
return 1;
}
void b()
{
}
int main()
{
int x=a();
return 0;
}
So my call trace is main->a->b
In this manner I want to trace each set paths of calls.
I have thought of a depth first search. But i am not sure how this would go.
Can anyone suggest me any concrete method to be implemented in perl?
I will have C program file and will run a perl script over it to get call traces.
There are a number of free call-graph programs listed in this article, including egypt which is a small Perl script that uses gcc and Graphviz to generate the static call graph of a C program.