如何在 Mac 上调试 SIGSEGV?
我刚刚开始作为一名 Android 应用程序开发人员,我的第一个应用程序已经遇到了问题 :(
这是一个使用 jQTouch 创建并与 PhoneGap 打包的 Web 应用程序,已上市几周。一位客户正在 Motorola Milestone 上运行它(加拿大的 Droid)使用 Android 2.1,她说它崩溃了
我尝试使用我从以下网站定义的 AVD 重现它,但确实遇到了 SIGSEGV 异常。 http://mobile.tutsplus.com/tutorials/android/ common-android-virtual-device-configurations/
我环顾四周,发现我必须在工具中运行日志跟踪才能查看崩溃背后的原因。我找到了两个工具,stack.py 和 parse_stack.py,但是它们需要安装一个命令:arm-eabi-addr2line,而我没有它。 再次搜索,我在GitHub上找到了它: https://github.com/jsnyder/arm-eabi -toolchain/
现在,尝试安装此命令,它说我没有足够新的 GCC 版本。我安装了最新的 XCode,我认为它带有 GCC。否则它只会说未找到 GCC。
问题
- 如何在我的 Mac 上安装此命令 arm-eabi-addr2line?
- 我这样做是为了无意义吗?如果 stack.py 告诉我 Android SDK 中出现问题,我该如何修复我的应用程序?
- 非常感谢!
I just starting as an Android app developer and I already have a problem with my first app :(
It's a webapp created with jQTouch and packaged with PhoneGap that is on the market for a few weeks. One customer is running it on a Motorola Milestone (Canadian equivalent of the Droid) using Android 2.1 and she says it's crashing.
I tried to reproduce it with the AVD I defined from the following website and I do get a SIGSEGV exception.
http://mobile.tutsplus.com/tutorials/android/common-android-virtual-device-configurations/
I looked around and I learned that I have to run the log trace in a tool to view the reason behind the crash. I found two tools, stack.py and parse_stack.py, however they require a command to be installed: arm-eabi-addr2line and I don't have it.
Searching again, I found it on GitHub: https://github.com/jsnyder/arm-eabi-toolchain/
Now, trying to install this command, it says I don't have a recent enough version of GCC. I have the latest XCode installed and I think it comes with GCC. Or else it would just say that GCC is not found.
Questions
- How do I get this command, arm-eabi-addr2line, installed on my Mac?
- Am I doing this for nothing? If stack.py tells me something is wrong in the Android SDK, what can I do to fix my app?
- VERY BIG THANK YOU!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
除非您正在编写自己的固件,否则您不会调试 SIGSEGV 崩溃。这些代表 Android 中非常低级的崩溃。
打包一个演示崩溃的示例项目并将其上传到 http://b.android.com,以及如何重现崩溃的步骤列表。还包括您在 LogCat 中看到的 SIGSEGV 故障转储。
You do not debug SIGSEGV crashes unless you are writing your own firmware. Those represent very low-level crashes in Android.
Package up a sample project that demonstrates the crash and upload it to http://b.android.com, along with a list of steps for how to reproduce the crash. Also include there the SIGSEGV crash dump that you are seeing in LogCat.
MacPorts 是一个很棒的工具,可以安装调试所需的任何内容,因为它可以安装 python 和较新版本的 gcc http ://www.macports.org/
MacPorts is a great tool for installing anything you might need to debug this as it can install python, and newer versions of gcc for you http://www.macports.org/