diff options
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 95a3ae9..53db335 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -4445,18 +4445,34 @@ process_event_stop_test: 3. The initiating frame exists and is different from the current frame. This means the exception or longjmp has been caught beneath the initiating frame, so keep - going. */ + going. + + 4. longjmp breakpoint has been placed just to protect + against stale dummy frames and user is not interested in + stopping around longjmps. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_CLEAR_LONGJMP_RESUME\n"); - init_frame = frame_find_by_id (ecs->event_thread->initiating_frame); - gdb_assert (ecs->event_thread->control.exception_resume_breakpoint != NULL); delete_exception_resume_breakpoint (ecs->event_thread); + if (what.is_longjmp) + { + check_longjmp_breakpoint_for_call_dummy (ecs->event_thread->num); + + if (!frame_id_p (ecs->event_thread->initiating_frame)) + { + /* Case 4. */ + keep_going (ecs); + return; + } + } + + init_frame = frame_find_by_id (ecs->event_thread->initiating_frame); + if (init_frame) { struct frame_id current_id |