From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: Mark Kettenis Cc: ac131313@cygnus.com, kimball@sgrail.com, gdb@sources.redhat.com Subject: Re: gdb and dlopen Date: Wed, 17 Oct 2001 14:34:00 -0000 Message-id: <20011017173416.A18263@nevyn.them.org> References: <20011016213252.A8694@nevyn.them.org> <20011016220353.A9538@nevyn.them.org> <3BCCF83F.8010401@cygnus.com> <20011017010849.A23345@nevyn.them.org> <20011017011923.A27536@nevyn.them.org> <20011017140950.A10927@nevyn.them.org> <200110172126.f9HLQ8700257@delius.kettenis.local> X-SW-Source: 2001-10/msg00183.html On Wed, Oct 17, 2001 at 11:26:08PM +0200, Mark Kettenis wrote: > Date: Wed, 17 Oct 2001 14:09:50 -0400 > From: Daniel Jacobowitz > > (Shouldn't there be a way for us to tell when a thread dies without > receiving the TD_DEATH event anyway? We -are- attached to all threads, > and LinuxThreads threads are all separate processes...) > > Ultimately waitpid() will report that the process has exited. > Unfortunately there seems to be a window where we cannot access that > process's memory with ptrace, while waitpid() hasn't reported that > exit yet. Well, that's somewhat unfortunate. I guess there may not be anything we can do in that case. > I think the assumption that all threads/LWPs share the same VM is a > fair assumption for thread-db. GDB assumes this model in several > places, and you'd probably wouldn't call processes not sharing their > VM threads at all. > > As an aside, it appears that Solaris doesn't even allow you to read > memory from a particular LWP at all. Well, I'm not sure if there are any systems using thread_db that allow this model, but it's reasonable in general to share heap but not stack. I'll certainly bow to your judgement here, though. Being able to read from only the primary PID would be convenient - although I'm not sure what to do in the case where that first thread exits. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer