2012-07-18 Pedro Alves <palves@redhat.com>
authorPedro Alves <palves@redhat.com>
Wed, 18 Jul 2012 18:04:39 +0000 (18:04 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 18 Jul 2012 18:04:39 +0000 (18:04 +0000)
* infrun.c (handle_inferior_event) <TARGET_WAITKIND_NO_HISTORY>:
Pull the single step breakpoints out of the target.

gdb/ChangeLog
gdb/infrun.c

index 31f15c225d922eb68d377fa359deed0cbc19fad8..0f15a845d57c1b3dd49bfcf45ebeb636920e0231 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-18  Pedro Alves  <palves@redhat.com>
+
+       * infrun.c (handle_inferior_event) <TARGET_WAITKIND_NO_HISTORY>:
+       Pull the single step breakpoints out of the target.
+
 2012-07-18  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * probe.c (probe_safe_evaluate_at_pc): Rename variable `n_probes'.
index bd209f76d258f45505e937789ce91802c7d73fdc..49a442c871fb95da03632341f715f1dbf7ec145d 100644 (file)
@@ -3669,6 +3669,15 @@ handle_inferior_event (struct execution_control_state *ecs)
       if (debug_infrun)
         fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_NO_HISTORY\n");
       /* Reverse execution: target ran out of history info.  */
+
+      /* Pull the single step breakpoints out of the target.  */
+      if (singlestep_breakpoints_inserted_p)
+       {
+         if (!ptid_equal (ecs->ptid, inferior_ptid))
+           context_switch (ecs->ptid);
+         remove_single_step_breakpoints ();
+         singlestep_breakpoints_inserted_p = 0;
+       }
       stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid));
       print_no_history_reason ();
       stop_stepping (ecs);