diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-02-11 22:25:27 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-02-11 22:25:27 +0000 |
commit | e5a0a9048b9339a1cd00b010b7d2a1ac07eaffbd (patch) | |
tree | b924350643a1bce94ee033bf2d244bb9f0c44a53 | |
parent | * ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out on (diff) | |
download | binutils-gdb-e5a0a9048b9339a1cd00b010b7d2a1ac07eaffbd.tar.gz binutils-gdb-e5a0a9048b9339a1cd00b010b7d2a1ac07eaffbd.tar.bz2 binutils-gdb-e5a0a9048b9339a1cd00b010b7d2a1ac07eaffbd.zip |
gdb/
* breakpoint.c (delete_breakpoint) <bpt->related_breakpoint != NULL>:
New.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/breakpoint.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d9b7c607cbb..17753a99d67 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 0d558625709..4b2daf014d8 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) |