diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-08-13 15:05:15 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-08-13 15:05:15 +0000 |
commit | a71ca65c53b4854e11363b16aea0db3ca149b5a8 (patch) | |
tree | d28d2c0b038cfc8a0bd646517444989cc558c102 /src/server | |
parent | fbb46cfaff7c0d105ebe56956c343493a25381d6 (diff) | |
download | openocd_libswd-a71ca65c53b4854e11363b16aea0db3ca149b5a8.tar.gz openocd_libswd-a71ca65c53b4854e11363b16aea0db3ca149b5a8.tar.bz2 openocd_libswd-a71ca65c53b4854e11363b16aea0db3ca149b5a8.tar.xz openocd_libswd-a71ca65c53b4854e11363b16aea0db3ca149b5a8.zip |
Clear all dangling breakpoints upon GDB connection.
git-svn-id: svn://svn.berlios.de/openocd/trunk@912 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/gdb_server.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 59ce4647..3f346584 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -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); |