This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DS-5 Debugging on a Samsung S III

Note: This was originally posted on 22nd May 2013 at http://forums.arm.com

Hi there,

Assume I know nothing which isn't so far from the truth.  I've been trying to use DS-5 to debug native C++ code on my Android Galaxy S III.   I've downloaded the community edition and I've followed all the steps documented on the DS-5 website.  I've done the follow

1. Built my code with NDK_DEBUG=1
2. In debug configuration selected  APK native library debug ->  Attach to a running Android application.

I've noticed something odd here, when I fill in the Project Directory and APK file  entries the Process and Activity are suppose to fill themselves in.  For me they don't.

3. I then place a breakpoint in my Java code, run to this breakpoint and then select Connect To Target in the DS-5 debugger.  I get the following error message.

Unable to connect

Reason:
Failed gdbserver configuration:
The script file (run_nostart.py) failed during execution:

Failed to attach gdbserver to . Unable to locate gdbserver in run-as : Package /system/bin/sh is unknown/lib/. Rebuild the application with NDK_DEBUG=1


Which would seem to suggest that the gdbserver was not found.  Given I've built my application with NDK_DEBUG=1 I'm pretty confused.

Does anyone have any ideas?

Many thanks,

Derek
  • Note: This was originally posted on 15th July 2013 at http://forums.arm.com

    The issue looks like the gdbserver is not present in the Android system / apk packages
    [size=2]
    [/size]
    [size=2]to make sure of that, you can try "adb shell"  in any system terminal window to connet to your device/emulator, and then run "[/size]gdbserver --version[size=2]" to confirm that gdbserver is present in the android system.[/size]
    [size=2]also you can check whether the gdbserver binary are located in [your_android_project]\libs\armeabi and [/size][size=2][your_android_project]\libs\armeabi-v7a[/size]

    [size=2]one thing I'd like to point out: if the auto fill of the "[/size][color=#222222][font=Arial, Helvetica, sans-serif][size=2]APK file entries the Process and Activity[/size][/font][/color][color=#222222][font=Arial, Helvetica, sans-serif][size=2] entries[/size][/font][/color][size=2]" are not happening to your project, most time that is because you project is not build correctly and apk package is not generated.[/size]
    [size=2]
    [/size]
    [size=2]
    [/size]
  • Note: This was originally posted on 15th July 2013 at http://forums.arm.com

    I forgot to metion that, in the begining , you need to set[color=#222222][font=Arial, Helvetica, sans-serif][size=2] eclipse->windows->preferences->android->NDK to your NDK path in this setup page. this is required[/size][/font][/color] by the google NDK. without this the android native project won't build properly.