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: Break in a thread but continue other threads


On Fri, 2007-02-16 at 08:02 -0800, David Highley wrote:
> Is it possible to put a break in one thread but continue all the other
> threads?

No, gdb has a very simple model for thread debugging:
either all threads are running, or all are stopped.
* Except as noted below...


>  Our developers keep lamenting to me the inadequacies of the gdb
> debugger in debugging our run time configured multi-threaded
> applications. In several cases I can answer read the manual but in
> others I know the persons diligence and capabilities. While ddd is ok it
> would not be considered a great interface by any standard. I peronally
> am not complaining as I do not use any of the integrated development
> environments but I get plenty of input from the developer community;
> 300+ on just one program.

* Theoretically, you might set a thread-specific breakpoint
and attach to it the command "set scheduler-locking on".
If your host / target supports scheduler locking, this 
would prevent any other thread from running, whereupon
you could simply "continue".

However, use at your own risk... it's a great way to
create a deadlock.  I haven't tried this, usual disclaimers
apply...



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