Reputation: 137
I want the complete stack trace, mainly the list of functions traversed in a normal execution of a binary.
AFAIK, GDB provides the trace only when it hits a break point or in case of a crash.
Upvotes: 0
Views: 144
Reputation: 1
If your OS provides dtrace
, you can use the PID provider:
pid Provider
The pid provider allows for tracing of the entry and return of any function in a user process ...
Upvotes: 0
Reputation: 399803
That is called the call graph.
That would require either:
Of the above, only the first one would provide 100% accuracy, and of course in general its very hard to do since you often use libraries and those wouldn't be instrumented even if you got your own code to be.
The reason this is hard is that the stack frame "history" isn't normally recorded; once the program has stopped running there is no current stack frame to inspect, unlike when breaking in a debugger.
See also this question.
Upvotes: 3