D.9 Notification Packets
The gdb remote serial protocol includes notifications, packets that require no acknowledgment. Both the GDB and the stub may send notifications (although the only notifications defined at present are sent by the stub). Notifications carry information without incurring the round-trip latency of an acknowledgment, and so are useful for low-impact communications where occasional packet loss is not a problem.
A notification packet has the form % data # checksum, where data is the content of the notification, and checksum is a checksum of data, computed and formatted as for ordinary gdb packets. A notification's data never contains $, % or # characters. Upon receiving a notification, the recipient sends no + or - to acknowledge the notification's receipt or to report its corruption.
Every notification's data begins with a name, which contains no colon characters, followed by a colon character.
Recipients should silently ignore corrupted notifications and notifications they do not understand. Recipients should restart timeout periods on receipt of a well-formed notification, whether or not they understand it.
Senders should only send the notifications described here when this protocol description specifies that they are permitted. In the future, we may extend the protocol to permit existing notifications in new contexts; this rule helps older senders avoid confusing newer recipients.
(Older versions of gdb ignore bytes received until they see the $ byte that begins an ordinary packet, so new stubs may transmit notifications without fear of confusing older clients. There are no notifications defined for gdb to send at the moment, but we assume that most older stubs would ignore them, as well.)
The following notification packets from the stub to gdb are defined: