I\'m writing this for Android (ARM only), but I believe the principle is the same for generic Linux as well.
I\'m trying to capture the stack trace from within the s
First, you need to read the section on "async signal safe" functions:
http://man7.org/linux/man-pages/man7/signal.7.html
That's the entire set of functions that are safe to call in a signal handler. About the worst thing you can do is to call anything that calls malloc()/free() under the hood - or do it yourself.
Second, get it working outside of a signal handler first.
Third, these are probably apropos:
How to get C++ backtrace on Android
Android NDK: getting the backtrace