This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] fix for delete_breakpoint
- To: gdb-patches at sources dot redhat dot com
- Subject: [PATCH] fix for delete_breakpoint
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Fri, 08 Jun 2001 18:59:33 -0700
- Organization: Red Hat
If there are several breakpoints at the same address, only one of them
will actually be inserted. If the one that is inserted should happen
to be deleted, delete_breakpoints is supposed to make sure that another
of the duplicates will be inserted in its place. That was not happening,
but now it will.
2001-06-08 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (delete_breakpoint): Pass mark_inserted to
remove_breakpoint, so that the subsequent test for
bpt->inserted will succeed, and duplicates will be fixed up.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.39
diff -c -3 -p -r1.39 breakpoint.c
*** breakpoint.c 2001/06/02 00:36:20 1.39
--- breakpoint.c 2001/06/09 01:55:17
*************** delete_breakpoint (struct breakpoint *bp
*** 6763,6769 ****
breakpoint_delete_event (bpt->number);
if (bpt->inserted)
! remove_breakpoint (bpt, mark_uninserted);
if (breakpoint_chain == bpt)
breakpoint_chain = bpt->next;
--- 6763,6769 ----
breakpoint_delete_event (bpt->number);
if (bpt->inserted)
! remove_breakpoint (bpt, mark_inserted);
if (breakpoint_chain == bpt)
breakpoint_chain = bpt->next;