aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-02-11 22:25:27 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-02-11 22:25:27 +0000
commite5a0a9048b9339a1cd00b010b7d2a1ac07eaffbd (patch)
treeb924350643a1bce94ee033bf2d244bb9f0c44a53 /gdb/breakpoint.c
parentbe636754b785aa5b042991267c851af18ed5b6a9 (diff)
downloadgdb-e5a0a9048b9339a1cd00b010b7d2a1ac07eaffbd.zip
gdb-e5a0a9048b9339a1cd00b010b7d2a1ac07eaffbd.tar.gz
gdb-e5a0a9048b9339a1cd00b010b7d2a1ac07eaffbd.tar.bz2
gdb/
* breakpoint.c (delete_breakpoint) <bpt->related_breakpoint != NULL>: New.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 0d55862..4b2daf0 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -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)