I have C code in my Android app and would like to catch crashes and print them to a log file. I saw this post, and tried, but I can't find the execinfo lib. I'm working with Ubuntu 11.10 and using NDK for compiling to Android. Does anyone know how to find execinfo lib for NDK/ARM, or have another simple solution?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
On Android, you have some sample specials utils code allowing to see and/or dump the stack.
Implementation is in base/libs/utils/CallStack.cpp. You'll a find a tiny sample code here.