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: Problem debugging multi-threaded application


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


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