infrun.c:user_visible_resume_ptid: Don't check singlestep_breakpoints_inserted_p
authorPedro Alves <palves@redhat.com>
Mon, 22 Sep 2014 10:12:30 +0000 (11:12 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 25 Sep 2014 15:56:00 +0000 (16:56 +0100)
What matters for this function, is whether the user requested a
"step", for "set scheduler-locking step", not whether GDB is doing an
internal step for some reason.

 /* Return a ptid representing the set of threads that we will proceed,
    in the perspective of the user/frontend.  */
 extern ptid_t user_visible_resume_ptid (int step);

Therefore, the check for singlestep_breakpoints_inserted_p is actually
incorrect, and we end up applying schedlock more often on sss targets
than on non-sss targets.

Found by inspection while working on a patch that eliminates the
singlestep_breakpoints_inserted_p global.

Tested on x86_64 Fedora 20 on top of my 'software single-step on x86'
series.

gdb/
2014-09-25  Pedro Alves  <palves@redhat.com>

* infrun.c (user_visible_resume_ptid): Don't check
singlestep_breakpoints_inserted_p.

gdb/ChangeLog
gdb/infrun.c

index a191b6232d7130777c153c7c7220ececde9d179b..dbd222d77603062c68dfc6ee0bc7aa9799bc53b9 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-25  Pedro Alves  <palves@redhat.com>
+
+       * infrun.c (user_visible_resume_ptid): Don't check
+       singlestep_breakpoints_inserted_p.
+
 2014-09-25  Pedro Alves  <palves@redhat.com>
 
        * breakpoint.c (should_be_inserted): Add debug output.
index dc696e926424ce2e2767244f2daf5ec79a8295e3..5e123be0e0de9db6ff12cf8e09a5b1d34176f20f 100644 (file)
@@ -1739,8 +1739,7 @@ user_visible_resume_ptid (int step)
       resume_ptid = inferior_ptid;
     }
   else if ((scheduler_mode == schedlock_on)
-          || (scheduler_mode == schedlock_step
-              && (step || singlestep_breakpoints_inserted_p)))
+          || (scheduler_mode == schedlock_step && step))
     {
       /* User-settable 'scheduler' mode requires solo thread resume.  */
       resume_ptid = inferior_ptid;