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

2.2.  Session Layer: The Serial Connection

The serial connection is established in response to a target remote or target extended-remote command from the GDB client. The way the server handles this depends on the nature of the serial connection:

In each case there is no specific requirement that the target be either running or stopped. GDB will establish via RSP commands the state of the target once the connection is established.

GDB is almost entirely non-preemptive, which is reflected in the sequence of packet exchanges of RSP. The exception is when GDB wishes to interrupt an executing program (typically via ctrl-C). A single byte, 0x03, is sent (no packet structure). If the target is prepared to handle such interrupts it should recognize such bytes. Unless the target is routinely polling for input (which may be the case for simulators), a prompt response typically will require an event driven reader for the connection.

Embecosm divider strip