问题描述
非常自我解释.我使用ndk编译了本机c ++ exe.当我运行该应用程序时,它得到一个SIGSEGV,出现段错误并退出.logcat中没有堆栈跟踪或cpu上下文.
Pretty self explanatory. I compiled a native c++ exe using the ndk. When I run the app, it gets a SIGSEGV, seg faults and exits. There is no stack trace or cpu context in the logcat.
为什么?有关如何修复它的任何建议?
Why? Any suggestions on how to fix it?
推荐答案
有两种工具可用于调试 sigsev
.位于 $ NDK
目录中的 ndk-stac
k和 arm-linux-androideabi-addr2line
.第一个可帮助您过滤stacktrace和addr2line将程序地址转换为文件名和行号.检查您的 $ NDK
目录,以获取文档.
there are two tools you can use to debug your sigsev
. ndk-stac
k and arm-linux-androideabi-addr2line
located into your $NDK
dir.The first help you to filter the stacktrace and addr2line translates program addresses into file names and line num. Check into your $NDK
dir, for the documentation.
这篇关于对于存在段错误的本机android应用程序,为什么logcat中没有堆栈跟踪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!