2.5 Configuring a connection to a Linux application using gdbserver

For Linux application debugging, you can configure DS-5 Debugger to connect to a Linux application using gdbserver.

Prerequisites

Before connecting, you must:

  • Set up the target with an Operating System (OS) installed and booted. See the documentation supplied with the target for more information.
  • Obtain the target IP address or name for the connection between the debugger and the debug hardware adapter. If the target is in your local subnet, click Browse and select your target.
  • If required, set up a Remote Systems Explorer (RSE) connection to the target.

Note:

If you are connecting to an already running gdbserver, then you must ensure that it is installed and running on the target.

To run gdbserver and the application on the target use: gdbserver port path/myApplication

Where:

  • port is the connection port between gdbserver and the application.

  • path/myApplication is the application that you want to debug.

Procedure

  1. Select Window > Open Perspective > DS-5 Debug from the main menu.
  2. Select Debug Configurations... from the Run menu.
  3. Select DS-5 Debugger from the configuration tree and then click on New to create a new configuration.
  4. In the Name field, enter a suitable name for the new configuration.
  5. Click on the Connection tab to configure a DS-5 Debugger target connection:
    1. Select the required platform, Linux Application Debug project type and the required debug operation.
    2. Configure the connection between the debugger and gdbserver.
  6. Click on the Files tab to define the target environment and select debug versions of the application file and libraries on the host that you want the debugger to use.
    1. In the Target Configuration panel, select the application on the host that you want to download to the target and specify the location on the target where you want to store the selected file.
    2. In the Files panel, select the files on the host that you want the debugger to use to load the debug information. If required, you can also specify other files on the host that you want to download to the target.

    Note:

    Options in the Files tab are dependent on the type of debug operation that you select.
  7. Click on the Debugger tab to configure the debugger settings.
    1. In the Run control panel, specify the actions that you want the debugger to do after connecting to the target.
    2. Configure the host working directory or use the default.
    3. In the Paths panel, specify any source or library search directories on the host that the debugger uses when it displays source code.
  8. If required, click on the Arguments tab to enter arguments that are passed to the application when the debug session starts.
  9. If required, click on the Environment tab to create and configure the target environment variables that are passed to the application when the debug session starts.
  10. Click on Apply to save the configuration settings.
  11. Click on Debug to connect to the target.
  12. Debugging requires the DS-5 Debug perspective. If the Confirm Perspective Switch dialog box opens, click Yes to switch perspective.

When connected and the DS-5 Debug perspective opens you are presented with all the relevant views and editors.

For more information on these options, press F1 on your keyboard to display dynamic context help.

Non-ConfidentialPDF file icon PDF versionARM DUI0446Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.