android - 从eclipse远程调试Android NDK程序

标签 android eclipse gdb android-ndk

Android(在 Android 中运行的 gdbserver)说:

gdb: Unable to get location for thread creation breakpoint: requested event is not supported

那么,如何才能知道eclipse发送的gdb命令呢?

附言在cygwin shell中可以调试,只是不能在eclipse中调试。不知道eclipse发送了哪些命令。

最佳答案

android NDK 中包含的 gdbserver(至少从 r4b 开始)不支持多线程调试。在约翰·米歇尔 (John Michelau) 的评论之后,我有名义上的运气:

http://honeypod.blogspot.com/2008/01/debug-native-application-for-android.html

Multi-threaded applications now seem to be supported. The key is to run the GDB client from the one installed in the Android source tree at prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gdb.

即使这样做之后,我也只能在我的 native 库加载后调试线程。这是因为 GDB 不知道 Android 的链接器:

warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code.

关于android - 从eclipse远程调试Android NDK程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4840361/

相关文章:

java - Apache Maven 程序集插件无法与 OSGi bundle 一起使用

java - Eclipse 中的 LWJGL/opengl

linux - 让 gdb 使用更少的内存

linux - 通过 SSH 和 GDB 启动进程?

android - 保护Android apk防止反编译、网络嗅探等

java - Android SQLite错误: (1) near "Create": syntax error

自定义形状的Android弹出窗口

android - 如何以编程方式将RGB代码转换为十六进制并设置为Android中 TextView 或按钮的背景颜色

java - Android库项目 "java.lang.NoClassDefFoundError"

python - GDB自动加载Python脚本