Services - tools - models - for embedded software development
Embecosm divider strip
Prev  Next

2.5.  Putting it All Together to Build a Server

2.5.1. Using gdbserver
2.5.2. Implementing Server Code on the Target
2.5.3. Implementing Server Code for Simulators
2.5.4. Implementing a Custom Server for JTAG

There are three approaches to adding a RSP server to a target.

  1. Run the gdbserver program on the target. A variant of this uses a custom server program to drive a physical interface to real hardware. This is most commonly seen with programs, running on the host, which drive a JTAG link connected via a parallel port or USB.

  2. Implement code on the target to establish a connection, recognize the packets and implement the behavior.

  3. For simulators, add code to the simulator to establish a connection, recognize the packets and implement the behavior in the simulator.

When remote debugging, GDB assumes that the target server will terminate the connection if the target program exits. However there is a variant, invoked by target extended-remote, which makes the server persistent, allowing the user to restart a program, or run an alternative program. This is discussed in more detail later (see Section 3.1.2).

In general GDB assumes that when it connects to a target via RSP, that target will be stopped. However there are new features in GDB allowing it to work asynchronously while some or all threads in the target continue executing. This is discussed in more detail later (see Section 3.1.3).

Embecosm divider strip