Nice work on debug report.

How's the attached patch?

I've updated the BUGS document to encourage reports to try to
reproduce crashes w/dummy interface...



-- 
Øyvind Harboe
Embedded software and hardware consulting services
http://www.zylin.com
### Eclipse Workspace Patch 1.0
#P openocd
Index: src/server/gdb_server.c
===================================================================
--- src/server/gdb_server.c     (revision 2561)
+++ src/server/gdb_server.c     (working copy)
@@ -816,6 +816,11 @@
        gdb_service_t *gdb_service = connection->service->priv;
        gdb_connection_t *gdb_connection = connection->priv;
 
+       /* we're done forwarding messages. Tear down callback before
+        * cleaning up connection.
+        */
+       log_remove_callback(gdb_log_callback, connection);
+
        gdb_actual_connections--;
        LOG_DEBUG("GDB Close, Target: %s, state: %s, 
gdb_actual_connections=%d", 
                  gdb_service->target->cmd_name,
@@ -843,9 +848,10 @@
                LOG_ERROR("BUG: connection->priv == NULL");
        }
 
+
        target_unregister_event_callback(gdb_target_callback_event_handler, 
connection);
+
        target_call_event_callbacks(gdb_service->target, TARGET_EVENT_GDB_END);
-       log_remove_callback(gdb_log_callback, connection);
 
        target_call_event_callbacks(gdb_service->target, 
TARGET_EVENT_GDB_DETACH);
 
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to