This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: A question about gcc and threads under Linux 2.4
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: "Nikita V. Youshchenko" <alexmm at gala dot net>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 18 Mar 2003 11:57:49 -0500
- Subject: Re: A question about gcc and threads under Linux 2.4
- References: <200303181345.10851@zigzag.cs.msu.su>
On Tue, Mar 18, 2003 at 01:45:10PM +0300, Nikita V. Youshchenko wrote:
> Hello.
>
> When debugging threaded programs with gdb, unexpected thread switches often
> happen. E.g. if another gdb step-by-step executes one thread, and another
> thread executes a system call, ofted gdb switches to than thread.
>
> Gdb documentation says that on some targets gdb supports "set
> scheduler-locking" command that can help to avoid this behaviuor. But
> seems that this is not supported under Linux.
Actually, it is supported and works - at least in recent GDBs.
I don't know why GDB would be switching threads as you describe; do you
have a transcript you can show us? A test case?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer