Android的:如何使用NDK-gdb的采用了纯天然的可执行文件? [英] Android: How to use ndk-gdb with a pure native executable?

查看:159
本文介绍了Android的:如何使用NDK-gdb的采用了纯天然的可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 NDK-gdb的在JNI方面装载的共享库。是否有可能使用它在Android.mk调试纯天然的可执行文件,建有 BUILD_EXECUTABLE 目标?

I've used ndk-gdb for shared libraries loaded in JNI context. Is it possible to use it to debug pure native executables, built with BUILD_EXECUTABLE target in Android.mk?

推荐答案

您可以使用gdbserver的启动或附加到一个进程。

You can use gdbserver to start or attach to a process.

// Start debugger and attach to a running process
adb forward tcp:5039 tcp:5039
adb shell /system/bin/gdbserver tcp:5039 --attach PID

如果你正确地配置您的Eclipse环境中,您可以直接从Eclipse的调试。下面是一些链接我发现,帮助我。

If you correctly configure your Eclipse environment you can debug directly from Eclipse. Below are some links I found that helped me out.

常规调试:
的http:// mhandroid。字press.com / 2011/01/25 /如何-CC-调试,工程-上的Andr​​oid /

General Debugging:
http://mhandroid.wordpress.com/2011/01/25/how-cc-debugging-works-on-android/

设置Eclipse:
http://mhandroid.word$p$pss.com/2011/01/23/using-eclipse-for-android-cc-debugging/

Setting up eclipse:
http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-debugging/

这篇关于Android的:如何使用NDK-gdb的采用了纯天然的可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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