Inadvertently run inferior threads

Eli Zaretskii eliz@gnu.org
Mon Jun 15 15:14:00 GMT 2015


> Date: Mon, 15 Jun 2015 14:01:25 +0100
> From: Pedro Alves <palves@redhat.com>
> CC: gdb@sourceware.org
> 
> > 	  if (!tp->control.in_infcall)
> > 	    set_running (user_visible_resume_ptid (user_step), 1);
> > 
> > it winds up calling 'set_running', because the in_infcall flag is set
> > on the thread that called the inferior function, not on the thread
> > which was started and triggered TARGET_WAITKIND_SPURIOUS.
> > 
> > So 'set_running' is called, and it is called with minus_one_ptid,
> > which then has the effect of marking all the threads as running.
> 
> So that should mean that even for GNU/Linux, it should be possible
> to end in the exact same, when any thread other than the one that we
> had started the infcall in reports an event that doesn't cause a stop.
> E.g., a thread specific breakpoint, a "handle nostop" signal, etc.

Does that involve minus_one_ptid on GNU/Linux as well?  If not, that
call will not mark all threads as running, will it?



More information about the Gdb mailing list