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