2

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?

MM.
  • 4,224
  • 5
  • 37
  • 74

1 Answers1

0

Maybe using Thread.currentThread().getStackTrace() would help?

Sebastian Breit
  • 6,137
  • 1
  • 35
  • 53
  • No that would be the thread's stack. I am referring to the stack of activities managed by the activity manager (for example, as obtained using: adb shell dumpsys activity). – MM. May 03 '12 at 13:34