This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Is the current gdb 5.1 broken for Linuxthreads?
- To: James Cownie <jcownie at etnus dot com>
- Subject: Re: Is the current gdb 5.1 broken for Linuxthreads?
- From: Eric Paire <paire at ri dot silicomp dot fr>
- Date: Fri, 21 Sep 2001 13:53:58 +0200
- cc: "H . J . Lu" <hjl at lucon dot org>, Andrew Cagney <ac131313 at cygnus dot com>, Mark Kettenis <kettenis at science dot uva dot nl>, GDB <gdb at sourceware dot cygnus dot com>
>
> Eric wrote :-
>
> > There is no support for MT core dumps.
>
> H.J. replied :-
>
> > Try the current Red Hat kernel/ac kernel. They support it. The patch
> > is very small. I am enclosing it here.
>
> However inspection shows that that patch does _not_ implement a
> multi-threaded core dump. What it does is to dump a full core file for
> each thread.
>
> That seems a somewhat perverse approach, given that
>
> 1) the ELF core dump format easily handles a genuine multi-threaded
> core dump (cf Solaris, IRIX, ...)
>
This is not feasible in Linux as Linus does not want to implement any
specific pthread feature in the kernel (and the core dump is 100%
kernel code), e.g. why a thread doing a fault should kill the other,
perhaps the application is written in such a way that it can recover
from it.
> 2) debuggers already know how to read such multi-threaded core dumps
> and present them as a process with multiple threads.
>
The point is that debugger should understand the way MT core dumps are
done
> 3) dumping a full core dump for each thread is (to first
> approximation) using nthreads too much I/O and nthreads too much
> disk space.
>
If you look carefully at it, it only dumps the first thread, and the dump
is no longer allowed for any thread of this process.
> What is wanted is a genuine multi-threaded core dump, not this
> horror...
>
I would not say that it is, because it exists, and we have been leaving
without anything for years. I would just say that it is a first step
that is more useful that nothing.
-Eric
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Eric PAIRE
Web : http://www.ri.silicomp.com/~paire | Groupe SILICOMP - Research Institute
Email: eric.paire@ri.silicomp.com | 2, avenue de Vignate
Phone: +33 (0) 476 63 48 71 | F-38610 Gieres
Fax : +33 (0) 476 51 05 32 | FRANCE