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.