Search code examples
cgprof

List functions in the order they are executed


I define several functions in a file (the main function is defined by someone else).

I can use gprof to analyze how many times my functions have been called, but is there a way of getting a list with the functions by the order they are called in the main program?

of course I could write a message in the beginning of each function but there are quite a few of them.

I would also be happy if it could be done by gdb by specifying something like "break in the first function that is called in this file". Again they are too many to list explicitly.

Thanks.


Solution

  • And you don't want to use trace or truss or similar?