我试图将ndk-gdb附加到我的Android应用程序.
我使用的是Android-ndk-r6b和设备是Android 2.3,三星Galaxy S II.
我按照本例中的所有步骤单击此处查看示例
当我尝试将gdb与另一个应用程序连接时,我尝试使用一个应用程序,但是详细显示它总是附加到第一个应用程序本身
Found package name: <1st attached package name>
我试图ndk-gdb第一次启动使用此命令:
ndk-gdb --start --force --verbose
我尝试使用以下命令附加到另一个应用程序但无法成功:
ndk-gdb --launch=com.example.hellogdbserver.HelloGdbServer --force --verbose
第一次申请我总是得到以下错误:
ERROR: Non-debuggable application installed on the target device.Please re-install the debuggable version!
这是我得到的完整的shell日志
sh-4.1$ ndk-gdb --verbose --start --force
Android NDK installation path: /cygdrive/c/Android/android-ndk
Using default adb command: /cygdrive/c/Android/android-sdk-windows/platform-tools/adb
ADB version found: Android Debug Bridge version 1.0.26
Using final ADB command: '/cygdrive/c/Android/android-sdk-windows/platform-tools/adb'
Using auto-detected project path: /cygdrive/d/EclipseTestWorkspace/hello-gdbserver
Found package name: com.example.hellogdbserver
ABIs targetted by application: armeabi
Device API Level: 10
Device CPU ABIs: armeabi-v7a armeabi
Compatible device ABI: armeabi
Found debuggable flag: true
Found device gdbserver: /data/data/com.example.hellogdbserver/lib/gdbserver
Using gdb setup init: /cygdrive/d/EclipseTestWorkspace/hello-gdbserver/libs/armeabi/gdb.setup
Using toolchain prefix: /cygdrive/c/Android/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-
Using app out directory: /cygdrive/d/EclipseTestWorkspace/hello-gdbserver/obj/local/armeabi
ERROR: Could not extract package's data directory. Are you sure that
your installed application is debuggable?
sh-4.1$
请让我知道如何解决上述错误以及如何附加到新包.
我的手机没有扎根.希望这不会影响gdb.
这也没有帮助链接到类似的问题.由于我的手机是新手机,没有任何应用程序,除了当前正在开发的应用程序.(只有三星手机随附的包装.没有从市场上下载的应用程序.)
谢谢和问候,
SSuman185