2 * gdbserv-input.h -- part of GDB remote server.
4 * Copyright (C) 2000 Red Hat.
5 * This file is part of SID and is licensed under the GPL.
6 * See the file COPYING.SID for conditions for redistribution.
11 /* 0 = looking for start of packet */
13 /* 1 = got start of packet, looking for # terminator */
15 /* 2 = looking for first byte of checksum */
17 /* 3 = looking for second byte of checksum (indicating end of packet) */
19 /* 4 = ignoring everything while looking for an ack packet */
24 struct gdbserv_input {
26 /* The checksum calculated so far (sizeof >= 32 bits). */
27 unsigned long checksum;
28 /* The checksum we've received from the remote side (sizeof >= 32 bits). */
29 unsigned long xmitcsum;
30 /* Contents of the accumulated packet. */
32 unsigned long sizeof_buf;
33 /* Number of characters received. */
35 /* Number of characters retrieved */
37 /* what we are doing */
38 enum gdbinput_state state;
42 void gdbserv_input_attach (struct gdbserv *gdbserv);
43 void gdbserv_input_detach (struct gdbserv *gdbserv);
44 void gdbserv_input_data_packet (struct gdbserv *gdbserv, const char *buf, int len);
45 void gdbserv_input_wait_for_ack (struct gdbserv *gdbserv);