我有一个段错误,但我完全不知道如何找到它.
I've got a segfault but I have absolutely no idea how to locate it.
提示?
可以使用Android NDK Stacktrace Analyzer.
这些步骤在 wiki 上,但是基本上你需要从 logcat 获取堆栈跟踪到一个文件 (adb logcat > mycrash.log),然后将你的库转储到一个文本文件,然后在它们两个上运行程序.这是我用来做很多事情的 shell 脚本:
The steps are on the wiki, but basically you need to get the stack trace from logcat into a file (adb logcat > mycrash.log), then dump your library to a text file, then run the program on the two of them. Here's the shell script I use to do the lot:
#!/bin/sh
if test $# -lt 2 ; then
echo "Extract readable stack trace from Android logcat crash"
echo "Usage $0 lib.so crash.log"
exit 1
fi
of=$(mktemp)
echo "Disassemble $1"
~/tools/android-ndk-r5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-objdump -S $1 > $of
echo "Parse stack trace in $2"
~/bin/parse_stack.py $of $2
根据需要更改 Android NDK 和 parse_stack.py 文件的路径.
Change the paths to the Android NDK and parse_stack.py file as you need.
这篇关于如何在 Eclipse 中有效地调试用 JNI 包装的 C 代码?(安卓开发)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
上传进度侦听器未触发(Google 驱动器 API)Upload progress listener not fired (Google drive API)(上传进度侦听器未触发(Google 驱动器 API))
使用 Google Drive SDK 将文件保存在特定文件夹中Save file in specific folder with Google Drive SDK(使用 Google Drive SDK 将文件保存在特定文件夹中)
Google Drive Android API - 无效的 DriveId 和 Null ResourcGoogle Drive Android API - Invalid DriveId and Null ResourceId(Google Drive Android API - 无效的 DriveId 和 Null ResourceId)
谷歌驱动api服务账户查看上传文件到谷歌驱动使Google drive api services account view uploaded files to google drive using java(谷歌驱动api服务账户查看上传文件到谷歌驱动使用java
Google Drive 服务帐号返回 403 usageLimitsGoogle Drive service account returns 403 usageLimits(Google Drive 服务帐号返回 403 usageLimits)
com.google.api.client.json.jackson.JacksonFactory;Google Drcom.google.api.client.json.jackson.JacksonFactory; missing in Google Drive example(com.google.api.client.json.jackson.JacksonFactory;Google Drive 示例