Arm Community
Site
Search
User
Site
Search
User
Groups
Arm Research
DesignStart
Education Hub
Graphics and Gaming
High Performance Computing
Innovation
Multimedia
Open Source Software and Platforms
Physical
Processors
Security
System
Software Tools
TrustZone for Armv8-M
中文社区
Blog
Announcements
Artificial Intelligence
Automotive
Healthcare
HPC
Infrastructure
Innovation
Internet of Things
Machine Learning
Mobile
Smart Homes
Wearables
Forums
All developer forums
IP Product forums
Tool & Software forums
Pelion IoT Platform
Support
Open a support case
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Developer Community
Tools and Software
Software Tools
Jump...
Cancel
Software Tools
Arm Development Studio forum
DS-5 Android - Problem debugging on a device
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
11 replies
Subscribers
127 subscribers
Views
4329 views
Users
0 members are here
Related
DS-5 Android - Problem debugging on a device
Offline
iosif hamlatzis
over 7 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
Offline
Albert Cano Camps
over 7 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
Up
0
Down
Reply
Cancel
Reply
Offline
Albert Cano Camps
over 7 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
Up
0
Down
Reply
Cancel
Children
No data
More questions in this forum
By title
By date
By reply count
By view count
By most asked
By votes
By quality
Descending
Ascending
All recent questions
Unread questions
Questions you've participated in
Questions you've asked
Unanswered questions
Answered questions
Questions with suggested answers
Questions with no replies
Not Answered
Forum FAQs
0
ARM Community
1138
views
0
replies
Started
7 days ago
by
Annie Cracknell
Suggested Answer
How to view SFRs in DS during debugging?
0
481
views
1
reply
Latest
3 days ago
by
Ronan Synnott
Answered
Dual-core debugging in DS
0
3347
views
2
replies
Latest
16 days ago
by
Ivan Savvateev
Answered
Failure to get an evaluation license with error Unable to execute API call /api/v1/connect
0
4282
views
3
replies
Latest
21 days ago
by
Tim Holt
Suggested Answer
DS52020.0 connection to Musca-A/B boards not working
0
Arm Development Studio
Musca-A
5321
views
4
replies
Latest
23 days ago
by
Daniel Oliveira
>
View all questions in Arm Development Studio forum