c - Is there a way to dump the complete stack trace after normal execution of the binary? -
i want complete stack trace, list of functions traversed in normal execution of binary.
afaik, gdb provides trace when hits break point or in case of crash.
that called the call graph.
that require either:
- instrumentation, i.e. adding code each function record when entering/leaving it
- profiling, i.e. sampling program's state , recording functions detected
- emulation, i.e. running program on fake/virtual cpu , recording when jumps occur
of above, first 1 provide 100% accuracy, , of course in general hard since use libraries , wouldn't instrumented if got own code be.
the reason hard stack frame "history" isn't recorded; once program has stopped running there no current stack frame inspect, unlike when breaking in debugger.
see this question.
Comments
Post a Comment