gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 29 Feb 2012 14:52:44 +0000 (14:52 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 29 Feb 2012 14:52:44 +0000 (14:52 +0000)
* arm-linux-tdep.c (arm_linux_copy_svc): Reset stale FRAME.
* breakpoint.c (until_break_command): Likewise.
* elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
* infcall.c (call_function_by_hand): Likewise.
* infcmd.c (finish_forward): Likewise.
* infrun.c (insert_exception_resume_breakpoint): Likewise.

gdb/ChangeLog
gdb/arm-linux-tdep.c
gdb/breakpoint.c
gdb/elfread.c
gdb/infcall.c
gdb/infcmd.c
gdb/infrun.c

index a4857b87b3fb17f5506864a15118af0e35dba290..71c6d19d7615381968fad6248c0217bf46138201 100644 (file)
@@ -1,3 +1,12 @@
+2012-02-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * arm-linux-tdep.c (arm_linux_copy_svc): Reset stale FRAME.
+       * breakpoint.c (until_break_command): Likewise.
+       * elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
+       * infcall.c (call_function_by_hand): Likewise.
+       * infcmd.c (finish_forward): Likewise.
+       * infrun.c (insert_exception_resume_breakpoint): Likewise.
+
 2012-02-28  Joel Brobecker  <brobecker@adacore.com>
 
        From Tristan Gingold  <gingold@adacore.com>.
index ac4860c3dbd1c58dbc6809d0fabaa0bce4176f4c..e41205be70b97dde37b9a3ec1b1fde5a514de686 100644 (file)
@@ -937,6 +937,9 @@ arm_linux_copy_svc (struct gdbarch *gdbarch, struct regcache *regs,
                = set_momentary_breakpoint (gdbarch, sal, get_frame_id (frame),
                                            bp_step_resume);
 
+             /* set_momentary_breakpoint invalidates FRAME.  */
+             frame = NULL;
+
              /* We need to make sure we actually insert the momentary
                 breakpoint set above.  */
              insert_breakpoints ();
index db05b9798c096a42732344e335d1389da838b7fc..311c4510197b7f08d95eccb0f1f7be7e9b7dd30d 100644 (file)
@@ -10478,6 +10478,9 @@ until_break_command (char *arg, int from_tty, int anywhere)
       make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
     }
 
+  /* set_momentary_breakpoint could invalidate FRAME.  */
+  frame = NULL;
+
   if (anywhere)
     /* If the user told us to continue until a specified location,
        we don't specify a frame at which we need to stop.  */
index f8ed10efd00be3d0c9f333a1e8f907d4dd1bde08..9f8a7e8bf0f1b81d973cce5458c3f2faaf6d5548 100644 (file)
@@ -995,6 +995,9 @@ elf_gnu_ifunc_resolver_stop (struct breakpoint *b)
                                           prev_frame_id,
                                           bp_gnu_ifunc_resolver_return);
 
+      /* set_momentary_breakpoint invalidates PREV_FRAME.  */
+      prev_frame = NULL;
+
       /* Add new b_return to the ring list b->related_breakpoint.  */
       gdb_assert (b_return->related_breakpoint == b_return);
       b_return->related_breakpoint = b->related_breakpoint;
index 9af56ba4b9e907b49e854e86c772fccfc770e2c5..6c250e3c0cca39c7bf996b58020ceebbe4874cbc 100644 (file)
@@ -783,6 +783,10 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
        PUSH_DUMMY_CALL, saved as the dummy-frame TOS, and used by
        dummy_id to form the frame ID's stack address.  */
     bpt = set_momentary_breakpoint (gdbarch, sal, dummy_id, bp_call_dummy);
+
+    /* set_momentary_breakpoint invalidates FRAME.  */
+    frame = NULL;
+
     bpt->disposition = disp_del;
   }
 
index 8dfa4fdf9445d3945044479a1d62541b19b26702..06def78e80c640dcd1d185458f63080d78f2b07d 100644 (file)
@@ -1652,6 +1652,9 @@ finish_forward (struct symbol *function, struct frame_info *frame)
                                         get_stack_frame_id (frame),
                                          bp_finish);
 
+  /* set_momentary_breakpoint invalidates FRAME.  */
+  frame = NULL;
+
   old_chain = make_cleanup_delete_breakpoint (breakpoint);
 
   set_longjmp_breakpoint (tp, frame_id);
index 89f9362bec138a030ecc5f99cf35cd821f6de56e..81d1e5cf522f73f6edc703d66626d59cf6d5151e 100644 (file)
@@ -5520,6 +5520,10 @@ insert_exception_resume_breakpoint (struct thread_info *tp,
 
          bp = set_momentary_breakpoint_at_pc (get_frame_arch (frame),
                                               handler, bp_exception_resume);
+
+         /* set_momentary_breakpoint_at_pc invalidates FRAME.  */
+         frame = NULL;
+
          bp->thread = tp->num;
          inferior_thread ()->control.exception_resume_breakpoint = bp;
        }