* thread.c (free_thread): Do not delete the step resume breakpoint
authorDaniel Jacobowitz <drow@false.org>
Mon, 10 Sep 2007 21:27:23 +0000 (21:27 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 10 Sep 2007 21:27:23 +0000 (21:27 +0000)
right away.

gdb/ChangeLog
gdb/thread.c

index 1d6d0147e9238a05fe16ff05b50656e9081e7c5c..17023ec02a98a21d5542de9bb1cffecbca5b8184 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-10  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * thread.c (free_thread): Do not delete the step resume breakpoint
+       right away.
+
 2007-09-10  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * arch-utils.c (gdbarch_info_fill): Also try core_bfd.
index 563d18a8afa4e67217592ddbc500c142d6f8b181..b6762e1fcfa26191277128fd7a2461c2770adc74 100644 (file)
@@ -84,9 +84,11 @@ static void
 free_thread (struct thread_info *tp)
 {
   /* NOTE: this will take care of any left-over step_resume breakpoints,
-     but not any user-specified thread-specific breakpoints. */
+     but not any user-specified thread-specific breakpoints.  We can not
+     delete the breakpoint straight-off, because the inferior might not
+     be stopped at the moment.  */
   if (tp->step_resume_breakpoint)
-    delete_breakpoint (tp->step_resume_breakpoint);
+    tp->step_resume_breakpoint->disposition = disp_del_at_next_stop;
 
   /* FIXME: do I ever need to call the back-end to give it a
      chance at this private data before deleting the thread?  */