PR threads/2015
authorAndreas Schwab <schwab@linux-m68k.org>
Thu, 29 Sep 2005 20:41:27 +0000 (20:41 +0000)
committerAndreas Schwab <schwab@linux-m68k.org>
Thu, 29 Sep 2005 20:41:27 +0000 (20:41 +0000)
* infrun.c (adjust_pc_after_break): Don't use the state from a
non-matching thread context.

gdb/ChangeLog
gdb/infrun.c

index 9101e337a9606fdd7255b68a425cdb68a399c0d1..d59cd4ee5396806d5f29b780d48047a912a45036 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-29  Andreas Schwab  <schwab@suse.de>
+
+       PR threads/2015
+       * infrun.c (adjust_pc_after_break): Don't use the state from a
+       non-matching thread context.
+
 2005-09-29  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * rs6000-tdep.c (rs6000_frame_cache): Handle misdetected frameless
index b0ac322555312b6882d6b91544e3c70f686f2c08..4c2a78d2dbc33cbefd374edae41d8478809eb586 100644 (file)
@@ -1200,8 +1200,12 @@ adjust_pc_after_break (struct execution_control_state *ecs)
       /* When using hardware single-step, a SIGTRAP is reported for
          both a completed single-step and a software breakpoint.  Need
          to differentiate between the two as the latter needs
-         adjusting but the former does not.  */
-      if (currently_stepping (ecs))
+         adjusting but the former does not.
+
+         When the thread to be examined does not match the current thread
+         context we can't use currently_stepping, so assume no
+         single-stepping in this case.  */
+      if (ptid_equal (ecs->ptid, inferior_ptid) && currently_stepping (ecs))
        {
          if (prev_pc == breakpoint_pc
              && software_breakpoint_inserted_here_p (breakpoint_pc))