* breakpoint.c (delete_breakpoint) <bpt->related_breakpoint != NULL>:
	New.
This commit is contained in:
Jan Kratochvil 2010-02-11 22:25:27 +00:00
parent be636754b7
commit e5a0a9048b
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* breakpoint.c (delete_breakpoint) <bpt->related_breakpoint != NULL>:
New.
2010-02-11 Pedro Alves <pedro@codesourcery.com>
* ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out on

View File

@ -8691,6 +8691,16 @@ delete_breakpoint (struct breakpoint *bpt)
if (bpt->type == bp_none)
return;
/* At least avoid this stale reference until the reference counting of
breakpoints gets resolved. */
if (bpt->related_breakpoint != NULL)
{
gdb_assert (bpt->related_breakpoint->related_breakpoint == bpt);
bpt->related_breakpoint->disposition = disp_del_at_next_stop;
bpt->related_breakpoint->related_breakpoint = NULL;
bpt->related_breakpoint = NULL;
}
observer_notify_breakpoint_deleted (bpt->number);
if (breakpoint_chain == bpt)