I am trying to get call stack backtrace at my assert/exception handler. Can't include "execinfo.h"
therefore can't use int backtrace(void **buffer, int size);
.
Also, tried to use __builtin_return_address()
but acording to :http://codingrelic.geekhold.com/2009/05/pre-mortem-backtracing.html
... on some architectures, including my beloved MIPS, only __builtin_return_address(0) works.MIPS has no frame pointer, making it difficult to walk back up the stack. Frame 0 can use the return address register directly.
How can I reproduce full call stack backtrace?
See Question&Answers more detail:os