I am implementing a native signal handler that produces logs with richer detail than the standard tombstone files. I would like to include a dump of the current task's activity stack, to help me diagnose the bug.
One approach would be to use JNI to obtain the Activity manager from Java code. This would work, but is not guaranteed to be safe when called from within a signal handler.
My question is, is it possible to obtain information about the activity stack from native code?