This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Single stepping and threads
On Wed, 2006-11-29 at 08:38 -0800, Joel Brobecker wrote:
> > > I would say yes. A step should be a few instructions, while stepping
> > > over a call is potentially a much larger number of instructions.
> > > As a result, stepping over without letting the other threads go would
> > > more likely cause a lock.
> >
> > I think you mean "no" then?
>
> Oops, sorry, I meant "no".
>
> One of my coworkers expressed his opinion as follow:
>
> <<
> I would find it confusing if "step" and "next" behave differently with
> respect to threads, because they seem like basically the same thing.
> "Next is just like step, except that it goes over calls" seems simple to
> me. "Next is just like step, except that it goes over calls, and has
> some subtle difference regarding threads" seems more complicated to me.
>
> So I would suggest leaving the default as "off", or else changing it
> to "on".
Default on would be a disaster -- most threaded programs would
not behave even remotely the same under the debugger as they would
solo.
In fact, many would deadlock almost immediately.