Results 1 to 10 of 39

Thread: detecting function calls

Threaded View

  1. #1
    Join Date
    Aug 2012
    Beans
    623

    detecting function calls

    Hey,
    Is there a way to know what functions were called by a program during it's execution ?

    Say, I have a code, as follows
    Code:
    #include <stdio.h>
    
    int main(void)
    {
     fun1();
     fun2();
     fun3();
    
     return 0;
    }
    
    int fun1(){}
    int fun2(){fun2_1();}
    int fun3(){}
    
    int fun2_1(){}
    Here, the output should be something like

    Functions called are as follows
    fun1()
    fun2()
    fun2_1()
    fun3()


    Is there an option on gcc for this ?
    Last edited by IAMTubby; October 3rd, 2012 at 02:16 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •