简体   繁体   中英

For a native android application that seg faults, why is there no stack trace in logcat?

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?

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.

You're all wrong, you need to enable logging to logcat for STDIO and STDERR.

http://developer.android.com/tools/debugging/debugging-log.html#viewingStd

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM