gdb/
[deliverable/binutils-gdb.git] / gdb / infrun.c
index 95a3ae9583d65fc8f14ee6d9378f9547d641e8db..53db3350aec14f7bd06c0d100a552e26da16b0a6 100644 (file)
@@ -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
This page took 0.026263 seconds and 4 git commands to generate.