Connections to a target OS using gdbserver (GDBserver)

If your target application requires TCP/IP communication with the debug host, you must connect to the target using bridged Ethernet. Connections of this type are referred to as GDBserver connections. This method is an extension to that used for connections to a target running an application with a GDB stub. The following figure shows an example:

Figure 56. GDBserver connections

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


In this method, IP packets can be carried over the same link alongside the normal GDB protocol.

Show/hideGDBserver Scenario

Use the GDBserver connection method to debug an application on a target that has an embedded OS, such as Linux, that supports independent processes. In this case you can run GDB server (gdbserver) instances. The GDB server can have TCP/IP connections to the debug host that is running GDB. The DCC driver is available as a Linux OS download from the ARM web site.

Show/hidePrerequisites

To use the GDBserver connection method:

  • On the GDB connection to the target, you must enable DCC and Virtual Ethernet/TTY mode before starting the processor.

  • The target OS must be running a TCP/IP stack and gdbserver.

  • debug hardware acts as a network bridge between the target processor and the host PC using a virtual Ethernet link. The target must have its own IP address that is either fixed or obtained from a DHCP server, and that appears on the virtual Ethernet as an independent host.

Show/hideProcedure

If your application uses an IP stack, it can communicate over DCC through a bridged Ethernet connection.

To debug an application using a GDBserver connection:

  1. Power-up your target hardware and debug hardware unit.

  2. Download and boot the target using the rviload utility.

  3. When the Linux kernel has finished booting, start the gdbserver as follows:

    ~ # gdbserver localhost:portnum filename
    

    The TCP/IP port number you specify here is the port number you must use with the GDB target remote command from subsequent GDB sessions. Also, make sure the port number is not in use by another service.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0498D
Non-ConfidentialID071311