Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
DS-5 Android - Problem debugging on a device
Jump...
Cancel
Locked
Locked
Replies
11 replies
Subscribers
119 subscribers
Views
6662 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
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
iosif hamlatzis
over 12 years ago
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
Albert Cano Camps
over 12 years ago
Note: This was originally posted on 27th April 2012 at
http://forums.arm.com
Hi Hamlatzis,
After reading your comments, I dare say that the problem is that gdbserver doesn't attach to your app properly, either because the native application has exited before DS-5 can attach gdbserver to it -then is when you see ("Failed to communicate with gdbserver....")- or because gdbserver has attached too early (in JVM).
It is difficult to say, but my guess is that gdbserver tries to attach to your native library when this has finished.
For the first case you might need to add a delay before launching the Java native libraries (or inside your native library). 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.
Once gdbserver is able to attach to the library loaded into memory you may be able to work with breakpoints and temporary breakpoints.
If you still have problems with gdbserver, it may be helpful if you could provide us with your app's status when the debugger fails, (open a windows terminal and execute >adb shell ps).
Albert.
Cancel
Vote up
0
Vote down
Cancel
Reply
Albert Cano Camps
over 12 years ago
Note: This was originally posted on 27th April 2012 at
http://forums.arm.com
Hi Hamlatzis,
After reading your comments, I dare say that the problem is that gdbserver doesn't attach to your app properly, either because the native application has exited before DS-5 can attach gdbserver to it -then is when you see ("Failed to communicate with gdbserver....")- or because gdbserver has attached too early (in JVM).
It is difficult to say, but my guess is that gdbserver tries to attach to your native library when this has finished.
For the first case you might need to add a delay before launching the Java native libraries (or inside your native library). 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.
Once gdbserver is able to attach to the library loaded into memory you may be able to work with breakpoints and temporary breakpoints.
If you still have problems with gdbserver, it may be helpful if you could provide us with your app's status when the debugger fails, (open a windows terminal and execute >adb shell ps).
Albert.
Cancel
Vote up
0
Vote down
Cancel
Children
No data