Re: core dumps from multi-threaded (kernel cloned) processes

Philip Gladstone (
Tue, 18 Nov 1997 17:35:14 -0500

I have a patch for 2.0.32 that creates a multithreaded core dump
(when a multithreaded process dies). I also have patches for gdb-4.16
to allow it to read it. *However* I only have this implemented for
i386, and I need someone who understands the other architectures to
implement the following function:

void get_pt_regs_for_task(struct pt_regs *regs,
struct task_struct *task)

i.e. a function that fills out a pt_regs structure for a random
task (which is not the current task). This is pretty easy for
the i386... (since it is already on the stack)


Christopher Blizzard wrote:
> In message <>, Philip Gladstone is rumored to have
> said:
> wrote:
> :I'm a little unclear on the semantics of posix threads and seg faults --
> :namely if the signal is not caught, does the whole process die, or just
> :that
> :thread? If the former case, then I'd just terminate the whole
> :heavyweight
> :process, but if the latter case, then I think that the linux pthreads is
> :behaving incorrectly.
> :
> Unfortunately, the way that it works in Linux is that each thread has it's
> own process...sort of. Signals are delivered to each "process" seperately
> and the pthreads library does it's best to deliver them according to the
> specification. This doesn't work very well with regards to core dumps or
> debugging.
> --Chris
> :by the way, does nayone know if where the ELF core file spec is -- which
> :defines the notes of type "CORE"? [I have the ELF spec itself...]
> :
> :Philip
> :--
> :Philip Gladstone +1 617 487 7700
> :Raptor Systems, Waltham, MA
> :Our new daughter:
> :
> ------------
> Christopher Blizzard
> AppliedTheory Communications, Inc.
> ------------

Philip Gladstone                           +1 617 487 7700
Raptor Systems, Waltham, MA
Our new daughter: