diff options
author | Pedro Alves <palves@redhat.com> | 2012-03-02 19:26:10 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-03-02 19:26:10 +0000 |
commit | f59f708a4b12a347cb003c750b96336822481900 (patch) | |
tree | 5d55c5e6edd298646d04e416ea15904a9cf8ea62 /gdb/breakpoint.c | |
parent | 44099a67be4e2b30f29c14cb38ca171ff8a3beda (diff) | |
download | gdb-f59f708a4b12a347cb003c750b96336822481900.zip gdb-f59f708a4b12a347cb003c750b96336822481900.tar.gz gdb-f59f708a4b12a347cb003c750b96336822481900.tar.bz2 |
2012-03-02 Tom Tromey <tromey@redhat.com>
Pedro Alves <palves@redhat.com>
PR breakpoints/13776:
* breakpoint.c (breakpoint_init_inferior): Delete step-resume
breakpoints.
(delete_longjmp_breakpoint_at_next_stop): New.
* breakpoint.h (delete_longjmp_breakpoint_at_next_stop): Declare.
* target.c (generic_mourn_inferior): Call mark_breakpoints_out
before deleting the inferior. Add comments.
* thread.c (clear_thread_inferior_resources): Don't delete lonjmp
breakpoints immediately, but only on next stop. Move that code
next to where we mark other breakpoints for deletion.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index ce35da2..3decd92 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -3341,6 +3341,10 @@ breakpoint_init_inferior (enum inf_context context) (gdb) tar rem :9999 # remote Windows gdbserver. */ + case bp_step_resume: + + /* Also remove step-resume breakpoints. */ + delete_breakpoint (b); break; @@ -6625,6 +6629,19 @@ delete_longjmp_breakpoint (int thread) } void +delete_longjmp_breakpoint_at_next_stop (int thread) +{ + struct breakpoint *b, *b_tmp; + + ALL_BREAKPOINTS_SAFE (b, b_tmp) + if (b->type == bp_longjmp || b->type == bp_exception) + { + if (b->thread == thread) + b->disposition = disp_del_at_next_stop; + } +} + +void enable_overlay_breakpoints (void) { struct breakpoint *b; |