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.
How to get C++ backtrace on Android
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.
Thanks for a prompt reply. Much appreciated. –
Meantime
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. –
Meantime
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 –
Meantime
© 2022 - 2024 — McMap. All rights reserved.