summaryrefslogtreecommitdiff
path: root/src/server
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/server
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/server')
-rw-r--r--src/server/gdb_server.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index f4e9c326..c0127388 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -61,6 +61,10 @@ enum gdb_detach_mode
/* target behaviour on gdb detach */
enum gdb_detach_mode detach_mode = GDB_DETACH_RESUME;
+/* number of gdb connections, mainly to supress gdb related debugging spam
+ * in helper/log.c when no gdb connections are actually active */
+int gdb_actual_connections;
+
/* set if we are sending a memory map to gdb
* via qXfer:memory-map:read packet */
/* enabled by default*/
@@ -797,6 +801,9 @@ int gdb_new_connection(connection_t *connection)
if (initial_ack != '+')
gdb_putback_char(connection, initial_ack);
target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_ATTACH );
+
+ gdb_actual_connections++;
+
return ERROR_OK;
}
@@ -805,6 +812,8 @@ int gdb_connection_closed(connection_t *connection)
gdb_service_t *gdb_service = connection->service->priv;
gdb_connection_t *gdb_connection = connection->priv;
+ gdb_actual_connections--;
+
/* see if an image built with vFlash commands is left */
if (gdb_connection->vflash_image)
{