From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Paire To: James Cownie Cc: "H . J . Lu" , Andrew Cagney , Mark Kettenis , GDB Subject: Re: Is the current gdb 5.1 broken for Linuxthreads? Date: Fri, 21 Sep 2001 05:04:00 -0000 Message-id: <200109211153.f8LBrww08032@mailhost.ri.silicomp.fr> References: <15kMa6-0Je-00@etnus.com> X-SW-Source: 2001-09/msg00188.html > > 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