在生成的Andr​​oid核心转储 [英] Generate core dump in android

查看:142
本文介绍了在生成的Andr​​oid核心转储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是一些共享一个深化发展Android的aplication 图书馆是我写的,并与NDK-R5B编译。该应用程序的工作原理, y和到图书馆工作过的电话,但我发现了一些错误, 分割故障,我需要进行调试,但是,我不知道该怎么调试 从Android原生code,我不知道我是否可以生成核心转储, 在Linux中,对于调试我的库。

I'm developping a android's aplication using some shared libraries written by me and compiled with ndk-r5b. The application works, y and the calls to the libraries works too, but I detected some errors, segmentations faults, and I need to debug it, but, I don't know how debug native code from android and I don't know if I can generate core dumps, as in linux, for debug my libraries.

你知道吗?

推荐答案

NDK的带有NDK-gdb的,据称可以让你调试本地应用程序。另外,如果你下载整个的Andr​​iod开源项目,他们也有一些版本用于调试GDB的。期待中的NDK以了解如何使用它的文档/文件夹。本教程还可能证明是有益的:的http://vilimpoc.org/blog/2010/09/23/hello-gdbserver-a-debuggable-jni-example-for-android/

The ndk comes with ndk-gdb, which supposedly allows you to debug native applications. Also, if you download the whole andriod open source project, they also have some version of gdb used for debugging. Look in the docs/ folder of the ndk to learn about using it. This tutorial might also prove helpful: http://vilimpoc.org/blog/2010/09/23/hello-gdbserver-a-debuggable-jni-example-for-android/

然而,如在最近的问题,我问:<一href="http://stackoverflow.com/questions/6158953/running-ndk-gdb-with-package-not-found-error-on-motorola-phone">Running NDK-GDB的包没有发现错误摩托罗拉手机我仍然无法得到它的工作。

However, as shown in a recent question I asked: Running ndk-gdb with package not found error on motorola phone I still can't get it to work.

编辑:三星决定破坏严重破坏一些需要本机调试的关键内部的,但它是很容易可以解决的,如果你有root权限的设备:您可以在你使用的是三星设备的评论说。如果使用--verbose标志,你可能会发现,误差比,包未知错误不同。这是因为它看起来在/data/system/packages.list,但三星重命名的文件/dbdata/system/packages.list。所以,如果你犯了一个符号链接到/data/system/packages.list该文件,(需要root访问权限),它应该工作。或者至少是声称NDK的邮件列表: http://osdir.com /ml/android-ndk/2011-03/msg00036.html

You said in the comments you were using a Samsung Device: Samsung decide to wreck havoc on some of the crucial internals required for native debugging, but it's easily fixable if you have root access to the device. If you use the --verbose flag, you'll probably find that the error is different than that, a package unknown error. That's because it's looking in /data/system/packages.list, but samsung renamed that file to /dbdata/system/packages.list. So if you make a symlink to that file in /data/system/packages.list, (requires root access) it should work. Or at least so claims the ndk mailing list: http://osdir.com/ml/android-ndk/2011-03/msg00036.html

这篇关于在生成的Andr​​oid核心转储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆