Quick Start Guide
Follow these steps to debug a sample Android Application.
System Requirements
Hardware
- A computer with Windows 7, Ubuntu Linux, or Mac OSX
Software
- Eclipse IDE for Java Developers – Juno SR1 Package (64-bit Windows / Mac OS X & 64-bit Linux)
- Android SDK
- Android NDK
Device
- Android 4.4+ devices for C/C++ NDK debugging
- Snapdragon Android devices with Adreno A3x or A4x GPU for OpenCL kernel debugging
Eclipse Plug-in Installation
- Start the Eclipse IDE.
- Go to the Help menu and select Install New Software.
- In the Work with text field, enter CDT Juno – http://download.eclipse.org/tools/cdt/releases/juno and press Enter.
- Wait for the Available Software window to refresh.
- Expand CDT Main Features.
- Select C/C++ Development Tools and click Next.
- In the ensuing window, click Next to install the selected plug-in.
- Accept the Licensing Agreement and Terms of Services. Click Finish.
- When the install is finished, a dialog prompts you to restart the IDE; do so.
- When the IDE has reinitialized, repeat Step 2 to navigate to the Install New Software window via the Help menu.
- Uncheck the Group items by category checkbox.
- Click Add.
- When the Add Repository window appears, click Archive.
- Navigate to the directory containing the SnapdragonDebuggerPlugin.zip file and select it.
Note: For Windows systems, the default location of this file is C:\Program Files (x86)\Qualcomm\Snapdragon Debugger for Eclipse\Eclipse\SnapdragonDebuggerPlugin.zip. - Click OK.
- When the Install window has refreshed, select the checkbox next to Qualcomm OpenCL Plugin and click Next.
- A new window appears. Click Next again.
- Accept the Licensing Agreement and Terms of Services. Click Finish.
- Restart the IDE when prompted.
Configuration and Launch
- Go to the File menu and select New -> Project.
- In the ensuing window, expand C/C++ and select C Project.
- Enter a project name and select Executable -> Empty Project.
Note: If Executable -> Empty Project is not visible, uncheck Show project types and toolchains only if they are supported on the platform. - Click Finish.
- Note: If you have existing source code, you can import it into your project by right-clicking and selecting Import -> File System and then navigating to your source code.
- Click the small arrow next to the debug icon and select Debug Configurations.
- Select the C/C++ Remote Application and click the New Launch Configuration icon that appears toward the top of the window.
- At the bottom of the window that appears after you have selected New Launch Configuration, you will see – next to the Apply button – a label reading Multiple launchers available. Click Select one....
- Select the Use configuration specific settings checkbox.
- Select LLDB Remote OpenCL Debugging Launcher and click OK.
- In the Main tab of the Launch Configuration window, there is a Project text field. Click Browse and choose the project you wish to debug.
- Select your newly created project and click OK.
- Click Search project… or Browse… and select the binary to debug.
- Click the OpenCL (LLDB) Debugger tab.
- Click Browse to specify the lldbmi executable.
- NOTE: For Windows systems, the default location of this file is C:\Program Files (x86)\Qualcomm\Snapdragon Debugger for Eclipse\Windows\lldbmi.exe.
- Click the Connection tab.
- Make sure localhost is entered in the Host name or IP address field.
- Enter port 1234 in the Port number field.
- Click Apply.
- Click Debug to attach to debugserver if already running. Please make sure the debugserver has been launched on the device.
Known Limitations
- Snapdragon Debugger for Eclipse can only debug 32bit applications.
- Snapdragon Debugger for Eclipse only functions correctly with one Android device attached to the host PC at a time. Running with more than one device or emulator attached could lead to undefined behavior.