![]() |
|
#1
|
|||
|
|||
how to get Call graph for applications, anybody knowsHi all,
Has someone tried on something like this? I want to implement a concept. I want to get a call graph for all functions and loops in an application. with Call graph i mean which line in source code was executed at a instant of time. The graph would be listing something like for:31 for:33 func1 for:33 func1 func2 func2 for:line number With this call graph we mean 1. for:31 called for:33 and func1 2. for:33 is for loop at line 33 , it is calls no one 3. func1 calls func2 and like that I had gone through tools such as gprof. But problem is gprof gives call graph at function level not at loop level. One more solution to it is use of "ptrace" which traces the execution flow of an application. I am going through articles on ptrace with the hope to find solution for my problem. If anyone knows about such a thing , do reply Tanveer |
|
#2
|
|||
|
|||
Re: how to get Call graph for applications, anybody knowsNo replies, but it is long time, i have added to this thread.
The way to get call graphs is : 1. Reading the disassembly file, and catching on the branch instructions present in that file. It is more of reading the debugging information and from that constructing the call graph. Very tricky but can be done. 2. Parsing the .c file Identifying the block in C code such as loops or function calls. After each identification, we should insert our own printf statement, on fprintf statement which writes to a file which loop or function was present. In this case, construction of parser for .c file is difficult task. Once, one is able to idnetify loops and functions, then code insertion is next task. And we get the call graph. Please Correct me, in my approach. Tanveer. |
Recent GIDBlog
Observations of Iraq by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simulation Problem | wu_weidong | C++ Forum | 7 | 12-Mar-2005 22:56 |
| how to call OnDraw in another class. | kumaran | MS Visual C++ / MFC Forum | 0 | 03-Mar-2005 03:02 |
| XML feed into PHP graph | Darksat | MySQL / PHP Forum | 2 | 27-Sep-2004 09:33 |
| algorithm for display complex graph | ctai010 | C++ Forum | 0 | 20-Mar-2004 05:24 |
| Phone call from computer | mrkamran | Computer Hardware Forum | 3 | 21-Feb-2004 13:03 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The