This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Problem debugging multi-threaded application
- From: Daniel Jacobowitz <drow at false dot org>
- To: Arvid Brodin <arvid dot brodin at enea dot com>
- Cc: gdb at sourceware dot org
- Date: Mon, 21 Jan 2008 13:35:17 -0500
- Subject: Re: Problem debugging multi-threaded application
- References: <4794E3DD.2030909@enea.com>
On Mon, Jan 21, 2008 at 07:26:37PM +0100, Arvid Brodin wrote:
> If I invoke gdb under strace, i.e. 'strace -f -o strace-out.txt gdb
> <my-program>'
Don't do that :-) strace and gdb both use the ptrace interface; if
you tell strace to follow children with -f, then it will win and
gdb will not be able to debug the program it started.
> The problem exists on these platforms:
Since the problem exists on older platforms and not on newer ones, it
may be a bug in the Linux kernel or glibc which has since been fixed.
GDB is very sensitive to such bugs.
> I have no idea if this is a bug in gdb, if we do something bad in
> our program, if it is a bug in nptl, or ...
It sounds sort of like a problem with job control and terminal groups,
but I'm not sure I have enough to guess... can you run it and use the
gdb "attach" command?
--
Daniel Jacobowitz
CodeSourcery