Fixed bug in gdb client leading to infinite loop on remote close.

This commit is contained in:
Daniel Beer 2011-07-27 17:18:52 +12:00
parent ce020a99f0
commit 51b1d6b90f
1 changed files with 3 additions and 0 deletions

View File

@ -63,6 +63,7 @@ static int gdb_read(struct gdb_data *data, int timeout_ms)
}
if (!len) {
data->error = EPIPE;
printc("Connection closed\n");
return -1;
}
@ -125,6 +126,8 @@ int gdb_flush_ack(struct gdb_data *data)
do {
c = gdb_getc(data);
if (c < 0)
return -1;
} while (c != '+' && c != '-');
} while (c != '+');