Mercurial > flash_v2
diff packages/hal/common/current/src/generic-stub.c @ 184:022f1e506033
Merge from eCos master repository on 2001-10-02-17:59:22-BST
| author | jlarmour |
|---|---|
| date | Tue, 02 Oct 2001 18:28:24 +0000 |
| parents | f62680ef1804 |
| children | 678094f34118 |
line wrap: on
line diff
--- a/packages/hal/common/current/src/generic-stub.c +++ b/packages/hal/common/current/src/generic-stub.c @@ -222,13 +222,16 @@ static void getpacket (buffer) char *buffer; { - struct gdb_packet packet; + struct gdb_packet packet; + int res; - packet.state = 0; - packet.contents = buffer; - while (__add_char_to_packet (readDebugChar () & 0xff, &packet) != 1) - { - /* Empty */ + packet.state = 0; + packet.contents = buffer; + while ((res = __add_char_to_packet (readDebugChar () & 0xff, &packet)) != 1) { + if (res == -2) { + putDebugChar ('+'); // Pretend we took the packet + __putpacket("E01"); // ... but didn't process it + } } } @@ -260,7 +263,7 @@ int { if (packet->length == BUFMAX) { packet->state = 0; - return -1; + return -2; } packet->checksum += ch; packet->contents[packet->length++] = ch;
