2

I am developing a game on android using native C++ and NDK(with eclipse) to build it. I found very difficult to debug the native c++ code with eclipse and NDK when it hits a crash, is there any way to get C++ backtrace when programe crashes ? Please advise.

user1908860
  • 509
  • 1
  • 9
  • 19

1 Answers1

2

You can do that with ndk-stack executable that is located in root of NDK. Read the docs about it in docs/NDK-STACK.html file.

Mārtiņš Možeiko
  • 12,733
  • 2
  • 45
  • 45
  • Thanks for a prompt reply. Much appreciated. – user1908860 Dec 18 '12 at 01:01
  • One more thing...ndk-stack depends on log-cat output. Thought a few times logcat itself doesn't have any trace, for example it just print.".Fatal signal 11 (SIGSEGV) at 0x00db9e58 (code=2)". How to get backtrace in this condition. – user1908860 Dec 18 '12 at 01:09
  • Ignore last query. I found a way to get complete logcat. if i run the "adb logcat" through shell then i get the complete logs and input the same to ndk-stack generator to see a readable backtrace. Thanks for all your help. This really helps me a lot :-) ..you rock buddy – user1908860 Dec 18 '12 at 01:28