find out the origin of function calls

Posted by user560343 on Stack Overflow See other posts from Stack Overflow or by user560343
Published on 2011-01-02T13:53:07Z Indexed on 2011/01/02 15:54 UTC
Read the original article Hit count: 99

Filed under:
|

Hi all,

I wonder if there is a software that can help us determine all possible origins of a function call. For example:

/* in file f1.c */
int f1() {
 x_func();
}

/* in file f2.c */
int f2() {
 x_func();
}

If we want to trace the origin of all function calls to x_func(), the output will be:

f1.c:f1()
f2.c:f2()

This is very useful when reading the source code. All answers are appreciated. Thank in advance :D

© Stack Overflow or respective owner

Related posts about c

    Related posts about linux