foss-for-synopsys-dwc-arc-processors/openocd — pull request #4 by anthony-kolesov (2013-08-21 14:40:30+00:00)
Title: ARC: Resolve warnings about keep_alive not called on time

OpenOCD was emitting warnings that "keep_alive() was not invoked in the 1000ms timelimit". This commit deals with these warnings (at least with most common occasion) and helps avoid possible warnings on GDB client side about "Ignoring packet error".

gdb_server should constantly send 'alive' packets to the client. To deal with thus OpenOCD has a function keep_alive() which should be invoked on a regular basis and it will send this packet to client if more than 500 milisecond has passed since previous one. To work smooth this function should be called at least once in a second otherwise warning is emitted. Those warnings themselves are harmless though annoying, however if keep_alive() will not be called for a time that is more than "remotetimeout" value n client side than GDB client will spill its own warnings "Ignoring packet error" so to have a smooth operation it is better to maintain constant pace of keep_alive() invokations.

This patch resolves those issues inside arc_regs_write_registers function. With EM Starter Kit this function is executed for about 2 seconds so several keep_alive() invokations should be inserted there.

Signed-off-by: Anton Kolesov