微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

从eclipse远程调试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.

即使这样做,我也只能在加载本机库之后调试线程.这是因为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.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐