openocd/src/server
Anton Kolesov e4125d136c gdb_server: Fix confusing warning when entering noack mode
Comment in gdb_server code mistakenly attributed constant warnings
about unexpected acknowledgement to the ACK packet sent by GDB when
establishing connection. However that is not the case, OpenOCD
gdb_server is handling this packet correctly without an warnings. This
warning instead was caused by the ACK packet which GDB sends right after
going into noack mode. Because OpenOCD gdb_server is already in noack
mode at this state, it emits warning about it. This is a documented GDB
behaviour
(https://sourceware.org/gdb/onlinedocs/gdb/Packet-Acknowledgment.html)
so there is no reason to scare users with warnings in this case.

This patch basically introduces two-level noack mode: after receiving
QStartNoAckMode gdb_server will set noack_mode to 1, then it will
receive this last ACK packet, but instead of printing a warning,
noack_mode will be increased to 2. Should there be any other ACK packets
after that, they will be properly reported by warning. All other code
that relies on noack_mode checks it for "!= 0", so there will be no
difference if it is 1 or 2.

Change-Id: I0e9c57fd93293bfe010390db2f3f161528b11d86
Signed-off-by: Anton Kolesov <anton.kolesov@synopsys.com>
Reviewed-on: http://openocd.zylin.com/1895
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-02-06 22:20:29 +00:00
..
gdb_server.c gdb_server: Fix confusing warning when entering noack mode 2014-02-06 22:20:29 +00:00
gdb_server.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
Makefile.am ecosboard: delete bit-rotted eCos code 2012-03-13 19:11:11 +00:00
server_stubs.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
server.c Clean up const usage to avoid excessive casting 2013-10-31 20:42:34 +00:00
server.h Clean up const usage to avoid excessive casting 2013-10-31 20:42:34 +00:00
startup.tcl Fix a bunch of typos. 2011-03-17 07:25:25 +01:00
tcl_server.c Allow "tcl_port" to be run after config to simply display the port. 2014-01-08 22:17:59 +00:00
tcl_server.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
telnet_server.c Clean up const usage to avoid excessive casting 2013-10-31 20:42:34 +00:00
telnet_server.h update files to correct FSF address 2013-06-05 19:52:42 +00:00