aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2019-08-28 10:57:23 -0700
committerGitHub <noreply@github.com>2019-08-28 10:57:23 -0700
commit30b93b866116957fcc4ce290686ac9d96febba3b (patch)
tree071cdf75a4e5890eef418a1f245fc4720435acc5
parent5173ddf75e972f78ed1a7aa12fa23b97e25fef67 (diff)
downloadriscv-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.c4
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);