summaryrefslogtreecommitdiff
path: root/src/helper/log.c
diff options
context:
space:
mode:
authorkc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-27 20:30:17 +0000
committerkc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-27 20:30:17 +0000
commit35d8b2bf77645cfc4bc89666640a2907449451ff (patch)
treebdf4c3b2a8d522054875c8a0d89482e38cdda42f /src/helper/log.c
parentafa77f86726646d36c5670ed59f73201ca02e597 (diff)
downloadopenocd+libswd-35d8b2bf77645cfc4bc89666640a2907449451ff.tar.gz
openocd+libswd-35d8b2bf77645cfc4bc89666640a2907449451ff.tar.bz2
openocd+libswd-35d8b2bf77645cfc4bc89666640a2907449451ff.tar.xz
openocd+libswd-35d8b2bf77645cfc4bc89666640a2907449451ff.zip
Author: Nicolas Pitre <nico@cam.org>
- Silence errors about keep_alive() not being called frequently enough unless a gdb session is active or debugging is enabled git-svn-id: svn://svn.berlios.de/openocd/trunk@1933 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/log.c')
-rw-r--r--src/helper/log.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/helper/log.c b/src/helper/log.c
index 4ba0dd6a..549d7127 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -385,7 +385,19 @@ void keep_alive()
current_time=timeval_ms();
if (current_time-last_time>1000)
{
- LOG_WARNING("keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (%lld). Workaround: increase \"set remotetimeout\" in GDB", current_time-last_time);
+ extern int gdb_actual_connections;
+
+ if (gdb_actual_connections)
+ LOG_WARNING("keep_alive() was not invoked in the "
+ "1000ms timelimit. GDB alive packet not "
+ "sent! (%lld). Workaround: increase "
+ "\"set remotetimeout\" in GDB",
+ current_time-last_time);
+ else
+ LOG_DEBUG("keep_alive() was not invoked in the "
+ "1000ms timelimit (%lld). This may cause "
+ "trouble with GDB connections.",
+ current_time-last_time);
}
if (current_time-last_time>500)
{