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.
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
- 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.
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
Select Window > Open Perspective > DS-5 Debug from the main menu.
Select Debug Configurations... from the Run menu.
Select DS-5 Debugger from the configuration tree and then click on New to create a new configuration.
In the Name field, enter a suitable name for the new
Click on the Connection tab to configure a DS-5 Debugger target connection:
Select the required platform, Linux Application Debug project type and the required debug operation.
Configure the connection between the debugger and
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.
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.
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.
Click on the Debugger tab to configure the debugger settings.
In the Run control panel, specify
the actions that you want the debugger to do after connecting to the
Configure the host working directory or use the default.
In the Paths panel, specify any source or library
search directories on the host that the debugger uses when it displays
If required, click on the Arguments tab to enter arguments that are passed to the application when the debug session starts.
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.
Click on Apply to save the configuration settings.
Click on Debug to connect to the target.
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.