Revert part of da12994 to fix ^C being eaten. (#397)

I had thought this was purely debug code but it apparently has a real
effect.

Change-Id: Id3fcb014b57575d46ab8e0b3262a9a7ab1bdb7f3
debug-log-reg-failure
Tim Newsome 2019-08-28 10:57:23 -07:00 committed by GitHub
parent 5173ddf75e
commit 30b93b8661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -367,10 +367,13 @@ static int gdb_put_packet_inner(struct connection *connection,
for (i = 0; i < len; i++)
my_checksum += buffer[i];
#ifdef _DEBUG_GDB_IO_
/*
* At this point we should have nothing in the input queue from GDB,
* however sometimes '-' is sent even though we've already received
* an ACK (+) for everything we've sent off.
*
* This code appears to sometimes eat a ^C coming from gdb.
*/
int gotdata;
for (;; ) {
@ -391,6 +394,7 @@ static int gdb_put_packet_inner(struct connection *connection,
LOG_DEBUG("Discard unexpected char %c", reply);
}
#endif
while (1) {
debug_buffer = strndup(buffer, len);