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

4.5.1.  Packet Representation

Although packets are character based, they cannot simply be represented as strings, since binary packets may contain the end of string character (zero). Packets are therefore represented as a simple struct, rsp_buf:

struct rsp_buf
{
  char  data[GDB_BUF_MAX];
  int   len;
};
	

For convenience, all packets have a zero added at location data[len], allowing the data field of non-binary packets to be printed as a simple string for debugging purposes.

Embecosm divider strip