[PATCH 17/17] infrun: scheduler-locking reverse

Jan Kratochvil jan.kratochvil@redhat.com
Thu Sep 17 08:39:00 GMT 2015


Hello Markus,

On Wed, 16 Sep 2015 09:59:23 +0200, Metzger, Markus T wrote:
> > If I/we make schedlock_step the default then this code of your patch gets
> > disabled:
> > 
> > +  else if ((scheduler_mode == schedlock_reverse)
> > +          && ((execution_direction == EXEC_REVERSE)
> > +              || target_record_is_replaying (minus_one_ptid)))
> > +    {
> > +      /* User-settable 'scheduler' mode requires solo thread resume during
> > +        reverse/replay stepping.  */
> > +      resume_ptid = inferior_ptid;
> > +    }
> 
> Yes.  But the code above this in infrun.c then applies:
> 
>   else if ((scheduler_mode == schedlock_on)
> 	   || (scheduler_mode == schedlock_step && step))
>     {
>       /* User-settable 'scheduler' mode requires solo thread
> 	 resume.  */
>       resume_ptid = inferior_ptid;
>     }

OK, I get it now.  I misunderstood it all despite word by word the new
description is right.  I would suggest changing the proposed:

off     == no locking (threads may preempt at any time)\n\
on      == full locking (no thread except the current thread may run)\n\
step    == scheduler locked during stepping commands (step, next, stepi, nexti).\n\
reverse == scheduler locked during reverse/replay execution.\n\

to:

off     == no locking (threads may preempt at any time)\n\
on      == full locking (no thread except the current thread may run)\n\
           This applies to both normal and reverse/replay execution.\n\
step    == scheduler locked during stepping commands (step, next, stepi, nexti).\n\
           This applies to both normal and reverse/replay execution.\n\
reverse == scheduler fully locked only during reverse/replay execution.\n\

And even gdb.texinfo somehow accordingly.


Thanks,
Jan



More information about the Gdb-patches mailing list