diff options
author | Tim Newsome <tim@sifive.com> | 2019-08-28 10:57:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-28 10:57:23 -0700 |
commit | 30b93b866116957fcc4ce290686ac9d96febba3b (patch) | |
tree | 071cdf75a4e5890eef418a1f245fc4720435acc5 | |
parent | 5173ddf75e972f78ed1a7aa12fa23b97e25fef67 (diff) | |
download | riscv-openocd-30b93b866116957fcc4ce290686ac9d96febba3b.zip riscv-openocd-30b93b866116957fcc4ce290686ac9d96febba3b.tar.gz riscv-openocd-30b93b866116957fcc4ce290686ac9d96febba3b.tar.bz2 |
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
-rw-r--r-- | src/server/gdb_server.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 56da6ed..be1dd78 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -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); |