This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Single stepping and threads


On Wed, Nov 29, 2006 at 01:40:49PM +0100, Mark Kettenis wrote:
> Are you talking about stepi or step?
> For step we should be very careful, since on some platforms the dynamic
> linker may play games with locks and we risk a deadlock if we don't let
> the other threads run.

That's the second part of the question :-)  The current setting of
"set scheduler-locking" applies to whenever proceed() is told to step,
rather than when the user says "step".  So it affects stepi always and
step within a source line, but not step over a function.  I talked
about "stepping" over prologues and over functions without debug info;
I hadn't thought about skipping shared library trampolines, but I
can definitely see how that would be a problem.

I don't like the user interface here; we say "step" and it will
sometimes run one thread and sometimes run all threads and it's hard to
explain which.  But we may not be able to do better without adding
unacceptable risk of deadlocks :-(

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]