This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gcore and nptl threads on linux
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: "J. Johnston" <jjohnstn at redhat dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 4 Mar 2003 19:52:18 -0500
- Subject: Re: gcore and nptl threads on linux
- References: <3E653983.8010005@redhat.com>
On Tue, Mar 04, 2003 at 06:40:51PM -0500, J. Johnston wrote:
> There is a problem with implementing gcore on linux with nptl thread
> support. Under the linux nptl model, each thread is mapped to an
> lwpid which is distinct from the pid of the process that created the
> thread.
>
> The current linux gcore code is merging the pid with the tid into an
> unsigned
> long value. This works ok in the old model because the tid and pids are
> only
> 16-bits in length. This no longer can work because tids in the nptl model
> are actually
> addresses and are not restricted to 16-bits.
I think this used to cause problems, too - it really should be just the
lwpid, I'd think. For these cases at least.
> This change would allow linux-proc.c to get the lwp where possible in a
> cleaner
> fashion.
>
> If nobody has any major objections to this proposal, I can post a patch
> shortly.
What do you plan to do when there is not a mapping, i.e. in an M:N
environment? This interface assumes 1:1.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer