2.6 Configuring a connection to a Linux kernel
Use these steps to configure a connection to a Linux target and load the Linux kernel into memory. The steps also describe how to add a pre-built loadable module to the target.
Before connecting, you must:
- Obtain the target IP address or name for the connection between the debugger and the debug
- If required, set up a Remote Systems Explorer (RSE) connection to the target.
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 debug 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 Kernel
and/or Devices Driver Debug project type and the
required debug operation.
Configure the connection between the debugger and the debug hardware adapter.
Click on the Debugger tab to configure the debugger settings.
In the Run control panel, select Connect only and set up initialization
scripts as required.
Operating System (OS) support is automatically enabled when a
Linux kernel vmlinux symbol file is loaded
into the debugger from the DS-5 Debugger launch configuration. However, you can
manually control this using the set
For example, if you want to delay the activation of operating system
support until after the kernel has booted and the Memory Management
Unit (MMU) is initialized, then you can configure a
connection that uses a target initialization script to disable operating system
Select the Execute debugger
In the field provided, enter commands to load debug symbols for the
kernel and any kernel modules that you want to debug, for example:
add-symbol-file <path>/vmlinux S:0
- The path to the vmlinux must be the same as your
- In the above example, the kernel image is called
vmlinux, but this could be named
differently depending on your kernel image.
- In the above example,
S:0 loads the symbols
for secure space with 0 offset. The offset and memory space
prefix is dependent on your target. When working with
multiple memory spaces, ensure that you load the symbols for
each memory space.
Configure the host working directory or use the default.
In the Paths panel, specify any source search
directories on the host that the debugger uses when it displays source
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
Tip: By default, for this type of connection, all processor exceptions are handled by
Linux on the target. Once connected, you can use the Manage
Signals dialog box in the Breakpoints view menu
to modify the default handler settings.