Displaying all stack history of a process

139 views Asked by At

How can i display all function calls of a process on Solaris?

dbx and pstack prints the call stack. What I want is a list of all the functions called by the process. In other words the output of several pstacks of the process.

1

There are 1 answers

0
Mark Plotnick On BEST ANSWER

You can see all the function calls a process makes, as it makes them, using truss with the -u option.

truss -u a.out -u : yourprogram args ...

will show all the calls made to functions in your program and to functions in libraries such as libc.

truss -u a.out -u :: yourprogram args ...

will also trace calls from library functions to other library functions. It'll be a lot more output; a call to printf will result in dozens of other calls to C library functions.