|ARM Technical Support Knowledge Articles|
Applies to: DS-5
Information in this knowledgebase article applies to:
What setup is needed to use DS-5 for debugging Android native (C/C++) applications and libraries?
You can use DS-5 with the Android Software Development Kit (SDK) and Native Development Kit (NDK).
To install the Android SDK and NDK please refer to http://developer.android.com/index.html. Both development kits contain examples on how to get started.
Once you have your Android application running on a device, you can attach gdbserver to the process and start to debug native code with DS-5 Debugger.
To debug with DS-5 Debugger you need to:
/system/bin/app_processfrom the target on to the computer that the debugger runs on. This file is needed by the debugger later on in order to find out which shared libraries are loaded by the target system. You can use the adb tool provided inside the Android SDK to transfer the file.
adb) and determine the process ID of the application you want to debug.
gdbserverto the process i.e.
gdbserver --attach :port pid
app_process, set the shared library search path (location of the library on the host containing debug symbols) and configure the debugger to connect only.
adbtool. In this case connect the debugger to IP address
Note DS-5 (from 5.5) now ships with two versions of gdbserver 7.1, gdbserver-stat-7.1 and gdbserver-dyna-7.1, that enables debugging of Android applications on production devices. gdbserver-stat-7.1 is a statically linked version of gdbserver. gdbserver-dyna-7.1 is a version that is built to dynamically link against the libraries on the Android target. Information for rebuilding the two binaries can be found in the included README.txt. Both gdbserver versions and README.txt can be found in <DS-5 installation path>/DS-5/arm/gdbserver/android.
Article last edited on: 2011-05-05 14:06:41
Did you find this article helpful? Yes No
How can we improve this article?