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/