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 Android - Problem debugging on a device

Note: This was originally posted on 19th April 2012 at http://forums.arm.com

I've finally managed to make the emulator work and now can debug my game on it. Thank you.

As I don't have an actual android device, I've installed an experimental version of ICS on my HP TouchPad. It seams everything works all right. I can use the adb utility provided with the SDK to connect to the device with no problem. But I cannot debug from inside eclipse under windows on the actual device.

I created a second debug configuration for the device and selected my device in the Connection tab at the combo-box, but after a while I receive a message that eclipse cannot connect to the device. This is strange as I have no problem with the connection. Under a dos window using the adb command I can see I can connect, I even can shell into the device.
Parents
  • Note: This was originally posted on 29th April 2012 at http://forums.arm.com


    ......

    For the second , you can edit the var SLEEP (in run.py and run_nostart.py), in order to add a delay between launching the activity and attaching gdbserver.


    Setting the SLEEP variable to 1.5 sec fixed the error message that the debugger couldn't start my game, but didn't stop at any of my breakpoints.


    Hi Hamlatzis,

    For the first case you might need to add a delay before launching the Java native libraries (or inside your native library).



    I tried different combinations of using sleep inside my code but nothing worked. I've added various sleep values only in the Java code just before calling the native code, same with just placing sleep only in the native code and tried having sleep both in the Java and native code. Nothing worked. None of the breakpoints fired.

    The result from adb shell ps can be found in the two attachments

    user = app_67
    PID = 2493
    PPID = 153
    VSIZE = 480320
    RSS = 38288
    WCHAN = ffffffff
    PC = 2aabc3e0 T
    NAME = com.iosif.hamlatzis.Thalassa

    Hope this helps.
Reply
  • Note: This was originally posted on 29th April 2012 at http://forums.arm.com


    ......

    For the second , you can edit the var SLEEP (in run.py and run_nostart.py), in order to add a delay between launching the activity and attaching gdbserver.


    Setting the SLEEP variable to 1.5 sec fixed the error message that the debugger couldn't start my game, but didn't stop at any of my breakpoints.


    Hi Hamlatzis,

    For the first case you might need to add a delay before launching the Java native libraries (or inside your native library).



    I tried different combinations of using sleep inside my code but nothing worked. I've added various sleep values only in the Java code just before calling the native code, same with just placing sleep only in the native code and tried having sleep both in the Java and native code. Nothing worked. None of the breakpoints fired.

    The result from adb shell ps can be found in the two attachments

    user = app_67
    PID = 2493
    PPID = 153
    VSIZE = 480320
    RSS = 38288
    WCHAN = ffffffff
    PC = 2aabc3e0 T
    NAME = com.iosif.hamlatzis.Thalassa

    Hope this helps.
Children
No data