diff options
author | Pedro Alves <palves@redhat.com> | 2014-06-02 22:27:32 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2014-06-02 22:27:32 +0100 |
commit | 0a261ed82e9b5f6fbc3725258a742515df8f4b42 (patch) | |
tree | 10a28a665a2c108795ffc541271a4c81bb76fa40 /gdb/gdbserver/server.c | |
parent | 96ae5695ce2512600524915ace0bfef95a9734fc (diff) | |
download | gdb-0a261ed82e9b5f6fbc3725258a742515df8f4b42.zip gdb-0a261ed82e9b5f6fbc3725258a742515df8f4b42.tar.gz gdb-0a261ed82e9b5f6fbc3725258a742515df8f4b42.tar.bz2 |
gdbserver: on GDB breakpoint reinsertion, also delete the breakpoint's commands.
If GDB decides to change the breakpoint's conditions or commands,
it'll reinsert the same breakpoint again, with the new options
attached, without deleting the previous breakpoint. E.g.,
(gdb) set breakpoint always-inserted on
(gdb) b main if 0
Breakpoint 1 at 0x400594: file foo.c, line 21.
Sending packet: $Z0,400594,1;X3,220027#68...Packet received: OK
(gdb) b main
Breakpoint 15 at 0x400594: file foo.c, line 21.
Sending packet: $Z0,400594,1#49...Packet received: OK
GDBserver understands this and deletes the breakpoint's previous
conditions. But, it forgets to delete the previous commands.
gdb/gdbserver/
2014-06-02 Pedro Alves <palves@redhat.com>
* ax.c (gdb_free_agent_expr): New function.
* ax.h (gdb_free_agent_expr): New declaration.
* mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
list.
(clear_breakpoint_conditions, clear_breakpoint_commands): Make
static.
(clear_breakpoint_conditions_and_commands): New function.
* mem-break.h (clear_breakpoint_conditions): Delete declaration.
(clear_breakpoint_conditions_and_commands): New declaration.
Diffstat (limited to 'gdb/gdbserver/server.c')
-rw-r--r-- | gdb/gdbserver/server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index ebc7735..cea56c1 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -3746,7 +3746,7 @@ process_serial_event (void) here. If we already have a list of parameters, GDB is telling us to drop that list and use this one instead. */ - clear_breakpoint_conditions (bp); + clear_breakpoint_conditions_and_commands (bp); process_point_options (bp, &dataptr); } } |