Clear all dangling breakpoints upon GDB connection.

git-svn-id: svn://svn.berlios.de/openocd/trunk@912 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2008-08-13 15:05:15 +00:00
parent fbb46cfaff
commit a71ca65c53
3 changed files with 77 additions and 38 deletions

View File

@@ -668,6 +668,13 @@ int gdb_new_connection(connection_t *connection)
/* output goes through gdb connection */
command_set_output_handler(connection->cmd_ctx, gdb_output, connection);
/* we must remove all breakpoints registered to the target as a previous
* GDB session could leave dangling breakpoints if e.g. communication
* timed out.
*/
breakpoint_clear_target(gdb_service->target);
watchpoint_clear_target(gdb_service->target);
/* register callback to be informed about target events */
target_register_event_callback(gdb_target_callback_event_handler, connection);