From: Kevin Buettner <kevinb@redhat.com>
To: Zheng Jian-Ming <zjm@cis.nctu.edu.tw>, gdb@sources.redhat.com
Subject: Re: about lin-lwp.c
Date: Mon, 12 Aug 2002 08:29:00 -0000 [thread overview]
Message-ID: <1020812152856.ZM31778@localhost.localdomain> (raw)
In-Reply-To: Zheng Jian-Ming <zjm@cis.nctu.edu.tw> "Re: about lin-lwp.c" (Aug 12, 12:06am)
> Alos in gdb/lin-lwp.c, does "multi-threads" for GNU/Linux mean
> multile LWPs (lightweight process ids), one PID (process id)?
I don't understand the question well enough to give a yes or no answer.
lin-lwp.c concerns itself with LWPs. On GNU/Linux, an LWP is just a
process that shares its address space other LWPs. If you obtain a
list of processes via the ``ps'' command, you'll see LWPs in addition
to pure processes (which don't share their address space). When GDB
wants to start, stop, or interrogate an LWP it does so via the very
same facilities that are used for processes.
At the moment, on GNU/Linux, there is a one-to-one mapping between
threads and lwps. There is a library, libthread_db.so, which is used
by GDB's thread-db.c to obtain the mapping from lwps to threads and
vice versa.
If you want to understand GDB's GNU/Linux thread support, you
must look at lin-lwp.c, thread-db.c, and proc-service.c. (There are
some other more generic files that you'll need to look at too.)
There is a comment near the top of lin-lwp.c which suggests that
lin-lwp.c can supply support for multi-threaded applications that
don't have the support of a threads library. To best of my knowledge,
this is not the case. (The comment in question may have been true
at one time, or it may simply express the hopes of the author in
this regard.)
> I don't need to handle the TIDs (thread ids), do I?
I don't know. What are you trying to do?
Kevin
next prev parent reply other threads:[~2002-08-12 15:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-11 8:55 Zheng Jian-Ming
2002-08-11 9:09 ` Zheng Jian-Ming
2002-08-12 8:29 ` Kevin Buettner [this message]
2002-08-12 7:59 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1020812152856.ZM31778@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=zjm@cis.nctu.edu.tw \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox